home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / Basic / Visual Basic.60 / COMMON / TOOLS / WINAPI / WIN32API.TXT < prev   
Encoding:
Text File  |  1998-06-18  |  652.1 KB  |  15,814 lines

  1. ' ------------------------------------------------------------------------
  2. '
  3. '    WIN32API.TXT -- Win32 API Declarations for Visual Basic
  4. '              Copyright (C) 1994-98 Microsoft Corporation
  5. '
  6. '  This file is required for the Visual Basic 6.0 version of the APILoader.
  7. '  Older versions of this file will not work correctly with the version
  8. '  6.0 APILoader.  This file is backwards compatible with previous releases
  9. '  of the APILoader with the exception that Constants are no longer declared
  10. '  as Global or Public in this file.
  11. '
  12. '  This file contains only the Const, Type,
  13. '  and Declare statements for  Win32 APIs.
  14. '
  15. '  You have a royalty-free right to use, modify, reproduce and distribute
  16. '  this file (and/or any modified version) in any way you find useful,
  17. '  provided that you agree that Microsoft has no warranty, obligation or
  18. '  liability for its contents.  Refer to the Microsoft Windows Programmer's
  19. '  Reference for further information.
  20. '
  21. ' ------------------------------------------------------------------------
  22.  
  23. ' Type definitions for Windows' basic types.
  24. Const ANYSIZE_ARRAY = 1
  25. Type RECT
  26.         Left As Long
  27.         Top As Long
  28.         Right As Long
  29.         Bottom As Long
  30. End Type
  31.  
  32. Type RECTL
  33.         Left As Long
  34.         Top As Long
  35.         Right As Long
  36.         Bottom As Long
  37. End Type
  38.  
  39. Type POINTAPI
  40.         x As Long
  41.         y As Long
  42. End Type
  43.  
  44. Type POINTL
  45.         x As Long
  46.         y As Long
  47. End Type
  48.  
  49. Type Size
  50.         cx As Long
  51.         cy As Long
  52. End Type
  53.  
  54. Type POINTS
  55.         x  As Integer
  56.         y  As Integer
  57. End Type
  58.  
  59. Type MSG
  60.     hwnd As Long
  61.     message As Long
  62.     wParam As Long
  63.     lParam As Long
  64.     time As Long
  65.     pt As POINTAPI
  66. End Type
  67.  
  68.  
  69. Const DELETE = &H10000
  70. Const READ_CONTROL = &H20000
  71. Const WRITE_DAC = &H40000
  72. Const WRITE_OWNER = &H80000
  73. Const SYNCHRONIZE = &H100000
  74.  
  75.  
  76. Const STANDARD_RIGHTS_READ = (READ_CONTROL)
  77. Const STANDARD_RIGHTS_WRITE = (READ_CONTROL)
  78. Const STANDARD_RIGHTS_EXECUTE = (READ_CONTROL)
  79. Const STANDARD_RIGHTS_REQUIRED = &HF0000
  80. Const STANDARD_RIGHTS_ALL = &H1F0000
  81.  
  82. Const SPECIFIC_RIGHTS_ALL = &HFFFF
  83.  
  84.  
  85. Type SID_IDENTIFIER_AUTHORITY
  86.         Value(6) As Byte
  87. End Type
  88.  
  89. Const SID_REVISION = (1)                         '  Current revision level
  90. Const SID_MAX_SUB_AUTHORITIES = (15)
  91. Const SID_RECOMMENDED_SUB_AUTHORITIES = (1)    ' Will change to around 6 in a future release.
  92.  
  93. Const SidTypeUser = 1
  94. Const SidTypeGroup = 2
  95. Const SidTypeDomain = 3
  96. Const SidTypeAlias = 4
  97. Const SidTypeWellKnownGroup = 5
  98. Const SidTypeDeletedAccount = 6
  99. Const SidTypeInvalid = 7
  100. Const SidTypeUnknown = 8
  101.  
  102. Type SID_AND_ATTRIBUTES
  103.         Sid As Long
  104.         Attributes As Long
  105. End Type
  106.  
  107. ' ///////////////////////////////////////////////////////////////////////////
  108. '                                                                          //
  109. '  Universal well-known SIDs                                               //
  110. '                                                                          //
  111. '      Null SID              S-1-0-0                                       //
  112. '      World                 S-1-1-0                                       //
  113. '      Local                 S-1-2-0                                       //
  114. '      Creator Owner ID      S-1-3-0                                       //
  115. '      Creator Group ID      S-1-3-1                                       //
  116. '                                                                          //
  117. '      (Non-unique IDs)      S-1-4                                         //
  118. '                                                                          //
  119. ' ///////////////////////////////////////////////////////////////////////////
  120. Const SECURITY_NULL_RID = &H0
  121. Const SECURITY_WORLD_RID = &H0
  122. Const SECURITY_LOCAL_RID = &H0
  123.  
  124. Const SECURITY_CREATOR_OWNER_RID = &H0
  125. Const SECURITY_CREATOR_GROUP_RID = &H1
  126.  
  127.  
  128. ' ///////////////////////////////////////////////////////////////////////////
  129. '                                                                          //
  130. '  NT well-known SIDs                                                      //
  131. '                                                                          //
  132. '      NT Authority          S-1-5                                         //
  133. '      Dialup                S-1-5-1                                       //
  134. '                                                                          //
  135. '      Network               S-1-5-2                                       //
  136. '      Batch                 S-1-5-3                                       //
  137. '      Interactive           S-1-5-4                                       //
  138. '      Service               S-1-5-6                                       //
  139. '      AnonymousLogon        S-1-5-7       (aka null logon session)        //
  140. '                                                                          //
  141. '      (Logon IDs)           S-1-5-5-X-Y                                   //
  142. '                                                                          //
  143. '      (NT non-unique IDs)   S-1-5-0x15-...                                //
  144. '                                                                          //
  145. '      (Built-in domain)     s-1-5-0x20                                    //
  146. '                                                                          //
  147. ' ///////////////////////////////////////////////////////////////////////////
  148.  
  149. Const SECURITY_DIALUP_RID = &H1
  150. Const SECURITY_NETWORK_RID = &H2
  151. Const SECURITY_BATCH_RID = &H3
  152. Const SECURITY_INTERACTIVE_RID = &H4
  153. Const SECURITY_SERVICE_RID = &H6
  154. Const SECURITY_ANONYMOUS_LOGON_RID = &H7
  155. Const SECURITY_LOGON_IDS_RID = &H5
  156. Const SECURITY_LOCAL_SYSTEM_RID = &H12
  157. Const SECURITY_NT_NON_UNIQUE = &H15
  158. Const SECURITY_BUILTIN_DOMAIN_RID = &H20
  159.  
  160.  
  161. ' ///////////////////////////////////////////////////////////////////////////
  162. '                                                                          //
  163. '  well-known domain relative sub-authority values (RIDs)...               //
  164. '                                                                          //
  165. ' ///////////////////////////////////////////////////////////////////////////
  166.  
  167. Const DOMAIN_USER_RID_ADMIN = &H1F4
  168. Const DOMAIN_USER_RID_GUEST = &H1F5
  169.  
  170. Const DOMAIN_GROUP_RID_ADMINS = &H200
  171. Const DOMAIN_GROUP_RID_USERS = &H201
  172. Const DOMAIN_GROUP_RID_GUESTS = &H202
  173.  
  174.  
  175. Const DOMAIN_ALIAS_RID_ADMINS = &H220
  176. Const DOMAIN_ALIAS_RID_USERS = &H221
  177. Const DOMAIN_ALIAS_RID_GUESTS = &H222
  178. Const DOMAIN_ALIAS_RID_POWER_USERS = &H223
  179. Const DOMAIN_ALIAS_RID_ACCOUNT_OPS = &H224
  180. Const DOMAIN_ALIAS_RID_SYSTEM_OPS = &H225
  181. Const DOMAIN_ALIAS_RID_PRINT_OPS = &H226
  182. Const DOMAIN_ALIAS_RID_BACKUP_OPS = &H227
  183. Const DOMAIN_ALIAS_RID_REPLICATOR = &H228
  184.  
  185.  
  186. '  Allocate the System Luid.  The first 1000 LUIDs are reserved.
  187. '  Use #999 here0x3E7 = 999)
  188.  
  189. '  end_ntifs
  190.  
  191. ' //////////////////////////////////////////////////////////////////////
  192. '                                                                     //
  193. '                           User and Group related SID attributes     //
  194. '                                                                     //
  195. ' //////////////////////////////////////////////////////////////////////
  196.  
  197. '  Group attributes
  198.  
  199. Const SE_GROUP_MANDATORY = &H1
  200. Const SE_GROUP_ENABLED_BY_DEFAULT = &H2
  201. Const SE_GROUP_ENABLED = &H4
  202. Const SE_GROUP_OWNER = &H8
  203. Const SE_GROUP_LOGON_ID = &HC0000000
  204.  
  205. '  User attributes
  206.  
  207. '  (None yet defined.)
  208.  
  209. ' ----------------
  210. '  Kernel Section
  211. ' ----------------
  212.  
  213. Const FILE_BEGIN = 0
  214. Const FILE_CURRENT = 1
  215. Const FILE_END = 2
  216.  
  217. Const FILE_FLAG_WRITE_THROUGH = &H80000000
  218. Const FILE_FLAG_OVERLAPPED = &H40000000
  219. Const FILE_FLAG_NO_BUFFERING = &H20000000
  220. Const FILE_FLAG_RANDOM_ACCESS = &H10000000
  221. Const FILE_FLAG_SEQUENTIAL_SCAN = &H8000000
  222. Const FILE_FLAG_DELETE_ON_CLOSE = &H4000000
  223. Const FILE_FLAG_BACKUP_SEMANTICS = &H2000000
  224. Const FILE_FLAG_POSIX_SEMANTICS = &H1000000
  225.  
  226. Const CREATE_NEW = 1
  227. Const CREATE_ALWAYS = 2
  228. Const OPEN_EXISTING = 3
  229. Const OPEN_ALWAYS = 4
  230. Const TRUNCATE_EXISTING = 5
  231.  
  232. ' Define the dwOpenMode values for CreateNamedPipe
  233. Const PIPE_ACCESS_INBOUND = &H1
  234. Const PIPE_ACCESS_OUTBOUND = &H2
  235. Const PIPE_ACCESS_DUPLEX = &H3
  236.  
  237. ' Define the Named Pipe End flags for GetNamedPipeInfo
  238. Const PIPE_CLIENT_END = &H0
  239. Const PIPE_SERVER_END = &H1
  240.  
  241. ' Define the dwPipeMode values for CreateNamedPipe
  242. Const PIPE_WAIT = &H0
  243. Const PIPE_NOWAIT = &H1
  244. Const PIPE_READMODE_BYTE = &H0
  245. Const PIPE_READMODE_MESSAGE = &H2
  246. Const PIPE_TYPE_BYTE = &H0
  247. Const PIPE_TYPE_MESSAGE = &H4
  248.  
  249. ' Define the well known values for CreateNamedPipe nMaxInstances
  250. Const PIPE_UNLIMITED_INSTANCES = 255
  251.  
  252. ' Define the Security Quality of Service bits to be passed
  253. '  into CreateFile
  254. Const SECURITY_CONTEXT_TRACKING = &H40000
  255. Const SECURITY_EFFECTIVE_ONLY = &H80000
  256.  
  257. Const SECURITY_SQOS_PRESENT = &H100000
  258. Const SECURITY_VALID_SQOS_FLAGS = &H1F0000
  259.  
  260. Type OVERLAPPED
  261.         Internal As Long
  262.         InternalHigh As Long
  263.         offset As Long
  264.         OffsetHigh As Long
  265.         hEvent As Long
  266. End Type
  267.  
  268. Type SECURITY_ATTRIBUTES
  269.         nLength As Long
  270.         lpSecurityDescriptor As Long
  271.         bInheritHandle As Long 
  272. End Type
  273.  
  274. Type PROCESS_INFORMATION
  275.         hProcess As Long
  276.         hThread As Long
  277.         dwProcessId As Long
  278.         dwThreadId As Long
  279. End Type
  280.  
  281. Type FILETIME
  282.         dwLowDateTime As Long
  283.         dwHighDateTime As Long
  284. End Type
  285.  
  286. Type SYSTEMTIME
  287.         wYear As Integer
  288.         wMonth As Integer
  289.         wDayOfWeek As Integer
  290.         wDay As Integer
  291.         wHour As Integer
  292.         wMinute As Integer
  293.         wSecond As Integer
  294.         wMilliseconds As Integer
  295. End Type
  296.  
  297. '  Serial provider type.
  298. Const SP_SERIALCOMM = &H1&
  299.  
  300. '  Provider SubTypes
  301. Const PST_UNSPECIFIED = &H0&
  302. Const PST_RS232 = &H1&
  303. Const PST_PARALLELPORT = &H2&
  304. Const PST_RS422 = &H3&
  305. Const PST_RS423 = &H4&
  306. Const PST_RS449 = &H5&
  307. Const PST_FAX = &H21&
  308. Const PST_SCANNER = &H22&
  309. Const PST_NETWORK_BRIDGE = &H100&
  310. Const PST_LAT = &H101&
  311. Const PST_TCPIP_TELNET = &H102&
  312. Const PST_X25 = &H103&
  313.  
  314. '  Provider capabilities flags.
  315. Const PCF_DTRDSR = &H1&
  316. Const PCF_RTSCTS = &H2&
  317. Const PCF_RLSD = &H4&
  318. Const PCF_PARITY_CHECK = &H8&
  319. Const PCF_XONXOFF = &H10&
  320. Const PCF_SETXCHAR = &H20&
  321. Const PCF_TOTALTIMEOUTS = &H40&
  322. Const PCF_INTTIMEOUTS = &H80&
  323. Const PCF_SPECIALCHARS = &H100&
  324. Const PCF_16BITMODE = &H200&
  325.  
  326. '  Comm provider settable parameters.
  327. Const SP_PARITY = &H1&
  328. Const SP_BAUD = &H2&
  329. Const SP_DATABITS = &H4&
  330. Const SP_STOPBITS = &H8&
  331. Const SP_HANDSHAKING = &H10&
  332. Const SP_PARITY_CHECK = &H20&
  333. Const SP_RLSD = &H40&
  334.  
  335. '  Settable baud rates in the provider.
  336. Const BAUD_075 = &H1&
  337. Const BAUD_110 = &H2&
  338. Const BAUD_134_5 = &H4&
  339. Const BAUD_150 = &H8&
  340. Const BAUD_300 = &H10&
  341. Const BAUD_600 = &H20&
  342. Const BAUD_1200 = &H40&
  343. Const BAUD_1800 = &H80&
  344. Const BAUD_2400 = &H100&
  345. Const BAUD_4800 = &H200&
  346. Const BAUD_7200 = &H400&
  347. Const BAUD_9600 = &H800&
  348. Const BAUD_14400 = &H1000&
  349. Const BAUD_19200 = &H2000&
  350. Const BAUD_38400 = &H4000&
  351. Const BAUD_56K = &H8000&
  352. Const BAUD_128K = &H10000
  353. Const BAUD_115200 = &H20000
  354. Const BAUD_57600 = &H40000
  355. Const BAUD_USER = &H10000000
  356.  
  357. '  Settable Data Bits
  358. Const DATABITS_5 = &H1&
  359. Const DATABITS_6 = &H2&
  360. Const DATABITS_7 = &H4&
  361. Const DATABITS_8 = &H8&
  362. Const DATABITS_16 = &H10&
  363. Const DATABITS_16X = &H20&
  364.  
  365. '  Settable Stop and Parity bits.
  366. Const STOPBITS_10 = &H1&
  367. Const STOPBITS_15 = &H2&
  368. Const STOPBITS_20 = &H4&
  369. Const PARITY_NONE = &H100&
  370. Const PARITY_ODD = &H200&
  371. Const PARITY_EVEN = &H400&
  372. Const PARITY_MARK = &H800&
  373. Const PARITY_SPACE = &H1000&
  374.  
  375. Type COMMPROP
  376.         wPacketLength As Integer
  377.         wPacketVersion As Integer
  378.         dwServiceMask As Long
  379.         dwReserved1 As Long
  380.         dwMaxTxQueue As Long
  381.         dwMaxRxQueue As Long
  382.         dwMaxBaud As Long
  383.         dwProvSubType As Long
  384.         dwProvCapabilities As Long
  385.         dwSettableParams As Long
  386.         dwSettableBaud As Long
  387.         wSettableData As Integer
  388.         wSettableStopParity As Integer
  389.         dwCurrentTxQueue As Long
  390.         dwCurrentRxQueue As Long
  391.         dwProvSpec1 As Long
  392.         dwProvSpec2 As Long
  393.         wcProvChar(1) As Integer
  394. End Type
  395.  
  396. 'Type COMSTAT
  397. '        fCtsHold As Long
  398. '        fDsrHold As Long
  399. '        fRlsdHold As Long
  400. '        fXoffHold As Long
  401. '        fXoffSent As Long
  402. '        fEof As Long
  403. '        fTxim As Long
  404. '        fReserved As Long
  405. '        cbInQue As Long
  406. '        cbOutQue As Long
  407. 'End Type
  408.  
  409. Type COMSTAT
  410.         fBitFields As Long 'See Comment in Win32API.Txt
  411.         cbInQue As Long
  412.         cbOutQue As Long
  413. End Type
  414. ' The eight actual COMSTAT bit-sized data fields within the four bytes of fBitFields can be manipulated by bitwise logical And/Or operations.
  415. ' FieldName     Bit #     Description
  416. ' ---------     -----     ---------------------------
  417. ' fCtsHold        1       Tx waiting for CTS signal
  418. ' fDsrHold        2       Tx waiting for DSR signal
  419. ' fRlsdHold       3       Tx waiting for RLSD signal
  420. ' fXoffHold       4       Tx waiting, XOFF char rec'd
  421. ' fXoffSent       5       Tx waiting, XOFF char sent
  422. ' fEof            6       EOF character sent
  423. ' fTxim           7       character waiting for Tx
  424. ' fReserved       8       reserved (25 bits)
  425.  
  426. '  DTR Control Flow Values.
  427. Const DTR_CONTROL_DISABLE = &H0
  428. Const DTR_CONTROL_ENABLE = &H1
  429. Const DTR_CONTROL_HANDSHAKE = &H2
  430.  
  431. '  RTS Control Flow Values
  432. Const RTS_CONTROL_DISABLE = &H0
  433. Const RTS_CONTROL_ENABLE = &H1
  434. Const RTS_CONTROL_HANDSHAKE = &H2
  435. Const RTS_CONTROL_TOGGLE = &H3
  436.  
  437. 'Type DCB
  438. '        DCBlength As Long
  439. '        BaudRate As Long
  440. '        fBinary As Long
  441. '        fParity As Long
  442. '        fOutxCtsFlow As Long
  443. '        fOutxDsrFlow As Long
  444. '        fDtrControl As Long
  445. '        fDsrSensitivity As Long
  446. '        fTXContinueOnXoff As Long
  447. '        fOutX As Long
  448. '        fInX As Long
  449. '        fErrorChar As Long
  450. '        fNull As Long
  451. '        fRtsControl As Long
  452. '        fAbortOnError As Long
  453. '        fDummy2 As Long
  454. '        wReserved As Integer
  455. '        XonLim As Integer
  456. '        XoffLim As Integer
  457. '        ByteSize As Byte
  458. '        Parity As Byte
  459. '        StopBits As Byte
  460. '        XonChar As Byte
  461. '        XoffChar As Byte
  462. '        ErrorChar As Byte
  463. '        EofChar As Byte
  464. '        EvtChar As Byte
  465. 'End Type
  466.  
  467. Type DCB
  468.         DCBlength As Long
  469.         BaudRate As Long
  470.         fBitFields As Long 'See Comments in Win32API.Txt
  471.         wReserved As Integer
  472.         XonLim As Integer
  473.         XoffLim As Integer
  474.         ByteSize As Byte
  475.         Parity As Byte
  476.         StopBits As Byte
  477.         XonChar As Byte
  478.         XoffChar As Byte
  479.         ErrorChar As Byte
  480.         EofChar As Byte
  481.         EvtChar As Byte
  482.         wReserved1 As Integer 'Reserved; Do Not Use 
  483. End Type
  484. ' The fourteen actual DCB bit-sized data fields within the four bytes of fBitFields can be manipulated by bitwise logical And/Or operations.
  485. ' FieldName             Bit #     Description
  486. ' -----------------     -----     ------------------------------
  487. ' fBinary                 1       binary mode, no EOF check
  488. ' fParity                 2       enable parity checking
  489. ' fOutxCtsFlow            3       CTS output flow control
  490. ' fOutxDsrFlow            4       DSR output flow control
  491. ' fDtrControl             5       DTR flow control type (2 bits)
  492. ' fDsrSensitivity         7       DSR sensitivity
  493. ' fTXContinueOnXoff       8       XOFF continues Tx
  494. ' fOutX                   9       XON/XOFF out flow control
  495. ' fInX                   10       XON/XOFF in flow control
  496. ' fErrorChar             11       enable error replacement
  497. ' fNull                  12       enable null stripping
  498. ' fRtsControl            13       RTS flow control (2 bits)
  499. ' fAbortOnError          15       abort reads/writes on error
  500. ' fDummy2                16       reserved 
  501.  
  502. Type COMMTIMEOUTS
  503.         ReadIntervalTimeout As Long
  504.         ReadTotalTimeoutMultiplier As Long
  505.         ReadTotalTimeoutConstant As Long
  506.         WriteTotalTimeoutMultiplier As Long
  507.         WriteTotalTimeoutConstant As Long
  508. End Type
  509.  
  510. Type SYSTEM_INFO
  511.         dwOemID As Long
  512.         dwPageSize As Long
  513.         lpMinimumApplicationAddress As Long
  514.         lpMaximumApplicationAddress As Long
  515.         dwActiveProcessorMask As Long
  516.         dwNumberOrfProcessors As Long
  517.         dwProcessorType As Long
  518.         dwAllocationGranularity As Long
  519.         dwReserved As Long
  520. End Type
  521.  
  522. ' Global Memory Flags
  523. Const GMEM_FIXED = &H0
  524. Const GMEM_MOVEABLE = &H2
  525. Const GMEM_NOCOMPACT = &H10
  526. Const GMEM_NODISCARD = &H20
  527. Const GMEM_ZEROINIT = &H40
  528. Const GMEM_MODIFY = &H80
  529. Const GMEM_DISCARDABLE = &H100
  530. Const GMEM_NOT_BANKED = &H1000
  531. Const GMEM_SHARE = &H2000
  532. Const GMEM_DDESHARE = &H2000
  533. Const GMEM_NOTIFY = &H4000
  534. Const GMEM_LOWER = GMEM_NOT_BANKED
  535. Const GMEM_VALID_FLAGS = &H7F72
  536. Const GMEM_INVALID_HANDLE = &H8000
  537.  
  538. Const GHND = (GMEM_MOVEABLE Or GMEM_ZEROINIT)
  539. Const GPTR = (GMEM_FIXED Or GMEM_ZEROINIT)
  540.  
  541. ' Flags returned by GlobalFlags (in addition to GMEM_DISCARDABLE)
  542. Const GMEM_DISCARDED = &H4000
  543. Const GMEM_LOCKCOUNT = &HFF
  544.  
  545. Type MEMORYSTATUS
  546.         dwLength As Long
  547.         dwMemoryLoad As Long
  548.         dwTotalPhys As Long
  549.         dwAvailPhys As Long
  550.         dwTotalPageFile As Long
  551.         dwAvailPageFile As Long
  552.         dwTotalVirtual As Long
  553.         dwAvailVirtual As Long
  554. End Type
  555.  
  556. ' Local Memory Flags
  557. Const LMEM_FIXED = &H0
  558. Const LMEM_MOVEABLE = &H2
  559. Const LMEM_NOCOMPACT = &H10
  560. Const LMEM_NODISCARD = &H20
  561. Const LMEM_ZEROINIT = &H40
  562. Const LMEM_MODIFY = &H80
  563. Const LMEM_DISCARDABLE = &HF00
  564. Const LMEM_VALID_FLAGS = &HF72
  565. Const LMEM_INVALID_HANDLE = &H8000
  566.  
  567. Const LHND = (LMEM_MOVEABLE + LMEM_ZEROINIT)
  568. Const LPTR = (LMEM_FIXED + LMEM_ZEROINIT)
  569.  
  570. Const NONZEROLHND = (LMEM_MOVEABLE)
  571. Const NONZEROLPTR = (LMEM_FIXED)
  572.  
  573. ' Flags returned by LocalFlags (in addition to LMEM_DISCARDABLE)
  574. Const LMEM_DISCARDED = &H4000
  575. Const LMEM_LOCKCOUNT = &HFF
  576.  
  577. '  dwCreationFlag values
  578.  
  579. Const DEBUG_PROCESS = &H1
  580. Const DEBUG_ONLY_THIS_PROCESS = &H2
  581.  
  582. Const CREATE_SUSPENDED = &H4
  583.  
  584. Const DETACHED_PROCESS = &H8
  585.  
  586. Const CREATE_NEW_CONSOLE = &H10
  587.  
  588. Const NORMAL_PRIORITY_CLASS = &H20
  589. Const IDLE_PRIORITY_CLASS = &H40
  590. Const HIGH_PRIORITY_CLASS = &H80
  591. Const REALTIME_PRIORITY_CLASS = &H100
  592.  
  593. Const CREATE_NEW_PROCESS_GROUP = &H200
  594.  
  595. Const CREATE_NO_WINDOW = &H8000000
  596.  
  597. Const PROFILE_USER = &H10000000
  598. Const PROFILE_KERNEL = &H20000000
  599. Const PROFILE_SERVER = &H40000000
  600.  
  601. Const MAXLONG = &H7FFFFFFF
  602. Const THREAD_BASE_PRIORITY_MIN = -2
  603. Const THREAD_BASE_PRIORITY_MAX = 2
  604. Const THREAD_BASE_PRIORITY_LOWRT = 15
  605. Const THREAD_BASE_PRIORITY_IDLE = -15
  606. Const THREAD_PRIORITY_LOWEST = THREAD_BASE_PRIORITY_MIN
  607. Const THREAD_PRIORITY_BELOW_NORMAL = (THREAD_PRIORITY_LOWEST + 1)
  608. Const THREAD_PRIORITY_NORMAL = 0
  609. Const THREAD_PRIORITY_HIGHEST = THREAD_BASE_PRIORITY_MAX
  610. Const THREAD_PRIORITY_ABOVE_NORMAL = (THREAD_PRIORITY_HIGHEST - 1)
  611. Const THREAD_PRIORITY_ERROR_RETURN = (MAXLONG)
  612.  
  613. Const THREAD_PRIORITY_TIME_CRITICAL = THREAD_BASE_PRIORITY_LOWRT
  614. Const THREAD_PRIORITY_IDLE = THREAD_BASE_PRIORITY_IDLE
  615.  
  616. ' ++ BUILD Version: 0093     Increment this if a change has global effects
  617.  
  618. ' Copyright (c) 1990-1995  Microsoft Corporation
  619.  
  620. ' Module Name:
  621.  
  622. '     winnt.h
  623.  
  624. ' Abstract:
  625.  
  626. '     This module defines the 32-Bit Windows types and constants that are
  627. '     defined by NT, but exposed through the Win32 API.
  628.  
  629. ' Revision History:
  630. Const APPLICATION_ERROR_MASK = &H20000000
  631. Const ERROR_SEVERITY_SUCCESS = &H0
  632. Const ERROR_SEVERITY_INFORMATIONAL = &H40000000
  633. Const ERROR_SEVERITY_WARNING = &H80000000
  634. Const ERROR_SEVERITY_ERROR = &HC0000000
  635.  
  636.  
  637. Const MINCHAR = &H80
  638. Const MAXCHAR = &H7F
  639. Const MINSHORT = &H8000
  640. Const MAXSHORT = &H7FFF
  641. Const MINLONG = &H80000000
  642. Const MAXByte = &HFF
  643. Const MAXWORD = &HFFFF
  644. Const MAXDWORD = &HFFFF
  645. '
  646. '  Calculate the byte offset of a field in a structure of type type.
  647. '  *  Language IDs.
  648. '  *
  649. '  *  The following two combinations of primary language ID and
  650. '  *  sublanguage ID have special semantics:
  651. '  *
  652. '  *    Primary Language ID   Sublanguage ID      Result
  653. '  *    -------------------   ---------------     ------------------------
  654. '  *    LANG_NEUTRAL          SUBLANG_NEUTRAL     Language neutral
  655. '  *    LANG_NEUTRAL          SUBLANG_DEFAULT     User default language
  656. '  *    LANG_NEUTRAL          SUBLANG_SYS_DEFAULT System default language
  657. '  */
  658. '
  659. '  *  Primary language IDs.
  660. '  */
  661. Const LANG_NEUTRAL = &H0
  662.  
  663. Const LANG_BULGARIAN = &H2
  664. Const LANG_CHINESE = &H4
  665. Const LANG_CROATIAN = &H1A
  666. Const LANG_CZECH = &H5
  667. Const LANG_DANISH = &H6
  668. Const LANG_DUTCH = &H13
  669. Const LANG_ENGLISH = &H9
  670. Const LANG_FINNISH = &HB
  671. Const LANG_FRENCH = &HC
  672. Const LANG_GERMAN = &H7
  673. Const LANG_GREEK = &H8
  674. Const LANG_HUNGARIAN = &HE
  675. Const LANG_ICELANDIC = &HF
  676. Const LANG_ITALIAN = &H10
  677. Const LANG_JAPANESE = &H11
  678. Const LANG_KOREAN = &H12
  679. Const LANG_NORWEGIAN = &H14
  680. Const LANG_POLISH = &H15
  681. Const LANG_PORTUGUESE = &H16
  682. Const LANG_ROMANIAN = &H18
  683. Const LANG_RUSSIAN = &H19
  684. Const LANG_SLOVAK = &H1B
  685. Const LANG_SLOVENIAN = &H24
  686. Const LANG_SPANISH = &HA
  687. Const LANG_SWEDISH = &H1D
  688. Const LANG_TURKISH = &H1F
  689.  
  690. '
  691. '  *  Sublanguage IDs.
  692. '  *
  693. '  *  The name immediately following SUBLANG_ dictates which primary
  694. '  *  language ID that sublanguage ID can be combined with to form a
  695. '  *  valid language ID.
  696. '  */
  697. Const SUBLANG_NEUTRAL = &H0                       '  language neutral
  698. Const SUBLANG_DEFAULT = &H1                       '  user default
  699. Const SUBLANG_SYS_DEFAULT = &H2                   '  system default
  700.  
  701. Const SUBLANG_CHINESE_TRADITIONAL = &H1           '  Chinese (Taiwan)
  702. Const SUBLANG_CHINESE_SIMPLIFIED = &H2            '  Chinese (PR China)
  703. Const SUBLANG_CHINESE_HONGKONG = &H3              '  Chinese (Hong Kong)
  704. Const SUBLANG_CHINESE_SINGAPORE = &H4             '  Chinese (Singapore)
  705. Const SUBLANG_DUTCH = &H1                         '  Dutch
  706. Const SUBLANG_DUTCH_BELGIAN = &H2                 '  Dutch (Belgian)
  707. Const SUBLANG_ENGLISH_US = &H1                    '  English (USA)
  708. Const SUBLANG_ENGLISH_UK = &H2                    '  English (UK)
  709. Const SUBLANG_ENGLISH_AUS = &H3                   '  English (Australian)
  710. Const SUBLANG_ENGLISH_CAN = &H4                   '  English (Canadian)
  711. Const SUBLANG_ENGLISH_NZ = &H5                    '  English (New Zealand)
  712. Const SUBLANG_ENGLISH_EIRE = &H6                  '  English (Irish)
  713. Const SUBLANG_FRENCH = &H1                        '  French
  714. Const SUBLANG_FRENCH_BELGIAN = &H2                '  French (Belgian)
  715. Const SUBLANG_FRENCH_CANADIAN = &H3               '  French (Canadian)
  716. Const SUBLANG_FRENCH_SWISS = &H4                  '  French (Swiss)
  717. Const SUBLANG_GERMAN = &H1                        '  German
  718. Const SUBLANG_GERMAN_SWISS = &H2                  '  German (Swiss)
  719. Const SUBLANG_GERMAN_AUSTRIAN = &H3               '  German (Austrian)
  720. Const SUBLANG_ITALIAN = &H1                       '  Italian
  721. Const SUBLANG_ITALIAN_SWISS = &H2                 '  Italian (Swiss)
  722. Const SUBLANG_NORWEGIAN_BOKMAL = &H1              '  Norwegian (Bokma
  723. Const SUBLANG_NORWEGIAN_NYNORSK = &H2             '  Norwegian (Nynorsk)
  724. Const SUBLANG_PORTUGUESE = &H2                    '  Portuguese
  725. Const SUBLANG_PORTUGUESE_BRAZILIAN = &H1          '  Portuguese (Brazilian)
  726. Const SUBLANG_SPANISH = &H1                       '  Spanish (Castilian)
  727. Const SUBLANG_SPANISH_MEXICAN = &H2               '  Spanish (Mexican)
  728. Const SUBLANG_SPANISH_MODERN = &H3                '  Spanish (Modern)
  729.  
  730. '
  731. '  *  Sorting IDs.
  732. '  *
  733. '  */
  734. Const SORT_DEFAULT = &H0                          '  sorting default
  735.  
  736. Const SORT_JAPANESE_XJIS = &H0                    '  Japanese0xJIS order
  737. Const SORT_JAPANESE_UNICODE = &H1                 '  Japanese Unicode order
  738.  
  739. Const SORT_CHINESE_BIG5 = &H0                     '  Chinese BIG5 order
  740. Const SORT_CHINESE_UNICODE = &H1                  '  Chinese Unicode order
  741.  
  742. Const SORT_KOREAN_KSC = &H0                       '  Korean KSC order
  743. Const SORT_KOREAN_UNICODE = &H1                   '  Korean Unicode order
  744.  
  745. '  The FILE_READ_DATA and FILE_WRITE_DATA constants are also defined in
  746. '  devioctl.h as FILE_READ_ACCESS and FILE_WRITE_ACCESS. The values for these
  747. '  constants *MUST* always be in sync.
  748. '  The values are redefined in devioctl.h because they must be available to
  749. '  both DOS and NT.
  750. '
  751.  
  752. Const FILE_READ_DATA = (&H1)                     '  file pipe
  753. Const FILE_LIST_DIRECTORY = (&H1)                '  directory
  754.  
  755. Const FILE_WRITE_DATA = (&H2)                    '  file pipe
  756. Const FILE_ADD_FILE = (&H2)                      '  directory
  757.  
  758. Const FILE_APPEND_DATA = (&H4)                   '  file
  759. Const FILE_ADD_SUBDIRECTORY = (&H4)              '  directory
  760. Const FILE_CREATE_PIPE_INSTANCE = (&H4)          '  named pipe
  761.  
  762. Const FILE_READ_EA = (&H8)                       '  file directory
  763. Const FILE_READ_PROPERTIES = FILE_READ_EA
  764.  
  765. Const FILE_WRITE_EA = (&H10)                     '  file directory
  766. Const FILE_WRITE_PROPERTIES = FILE_WRITE_EA
  767.  
  768. Const FILE_EXECUTE = (&H20)                      '  file
  769. Const FILE_TRAVERSE = (&H20)                     '  directory
  770.  
  771. Const FILE_DELETE_CHILD = (&H40)                 '  directory
  772.  
  773. Const FILE_READ_ATTRIBUTES = (&H80)              '  all
  774.  
  775. Const FILE_WRITE_ATTRIBUTES = (&H100)            '  all
  776.  
  777. Const FILE_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED Or SYNCHRONIZE Or &H1FF)
  778.  
  779. Const FILE_GENERIC_READ = (STANDARD_RIGHTS_READ Or FILE_READ_DATA Or FILE_READ_ATTRIBUTES Or FILE_READ_EA Or SYNCHRONIZE)
  780.  
  781.  
  782. Const FILE_GENERIC_WRITE = (STANDARD_RIGHTS_WRITE Or FILE_WRITE_DATA Or FILE_WRITE_ATTRIBUTES Or FILE_WRITE_EA Or FILE_APPEND_DATA Or SYNCHRONIZE)
  783.  
  784.  
  785. Const FILE_GENERIC_EXECUTE = (STANDARD_RIGHTS_EXECUTE Or FILE_READ_ATTRIBUTES Or FILE_EXECUTE Or SYNCHRONIZE)
  786.  
  787. Const FILE_SHARE_READ = &H1
  788. Const FILE_SHARE_WRITE = &H2
  789. Const FILE_ATTRIBUTE_READONLY = &H1
  790. Const FILE_ATTRIBUTE_HIDDEN = &H2
  791. Const FILE_ATTRIBUTE_SYSTEM = &H4
  792. Const FILE_ATTRIBUTE_DIRECTORY = &H10
  793. Const FILE_ATTRIBUTE_ARCHIVE = &H20
  794. Const FILE_ATTRIBUTE_NORMAL = &H80
  795. Const FILE_ATTRIBUTE_TEMPORARY = &H100
  796. Const FILE_ATTRIBUTE_COMPRESSED = &H800
  797. Const FILE_NOTIFY_CHANGE_FILE_NAME = &H1
  798. Const FILE_NOTIFY_CHANGE_DIR_NAME = &H2
  799. Const FILE_NOTIFY_CHANGE_ATTRIBUTES = &H4
  800. Const FILE_NOTIFY_CHANGE_SIZE = &H8
  801. Const FILE_NOTIFY_CHANGE_LAST_WRITE = &H10
  802. Const FILE_NOTIFY_CHANGE_SECURITY = &H100
  803. Const MAILSLOT_NO_MESSAGE = (-1)
  804. Const MAILSLOT_WAIT_FOREVER = (-1)
  805. Const FILE_CASE_SENSITIVE_SEARCH = &H1
  806. Const FILE_CASE_PRESERVED_NAMES = &H2
  807. Const FILE_UNICODE_ON_DISK = &H4
  808. Const FILE_PERSISTENT_ACLS = &H8
  809. Const FILE_FILE_COMPRESSION = &H10
  810. Const FILE_VOLUME_IS_COMPRESSED = &H8000
  811. Const IO_COMPLETION_MODIFY_STATE = &H2
  812. Const IO_COMPLETION_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED Or SYNCHRONIZE Or &H3)
  813. Const DUPLICATE_CLOSE_SOURCE = &H1
  814. Const DUPLICATE_SAME_ACCESS = &H2
  815.  
  816. ' //////////////////////////////////////////////////////////////////////
  817. '                                                                     //
  818. '                              ACCESS MASK                            //
  819. '                                                                     //
  820. ' //////////////////////////////////////////////////////////////////////
  821.  
  822. '
  823. '   Define the access mask as a longword sized structure divided up as
  824. '   follows:
  825.  
  826. '       typedef struct _ACCESS_MASK {
  827. '           WORD   SpecificRights;
  828. '           Byte  StandardRights;
  829. '           Byte  AccessSystemAcl : 1;
  830. '           Byte  Reserved : 3;
  831. '           Byte  GenericAll : 1;
  832. '           Byte  GenericExecute : 1;
  833. '           Byte  GenericWrite : 1;
  834. '           Byte  GenericRead : 1;
  835. '       } ACCESS_MASK;
  836. '       typedef ACCESS_MASK *PACCESS_MASK;
  837. '
  838. '   but to make life simple for programmer's we'll allow them to specify
  839. '   a desired access mask by simply OR'ing together mulitple single rights
  840. '   and treat an access mask as a DWORD.  For example
  841. '
  842. '       DesiredAccess = DELETE  Or  READ_CONTROL
  843. '
  844. '   So we'll declare ACCESS_MASK as DWORD
  845. '
  846.  
  847. '  begin_ntddk begin_nthal begin_ntifs
  848.  
  849. ' //////////////////////////////////////////////////////////////////////
  850. '                                                                     //
  851. '                              ACCESS TYPES                           //
  852. '                                                                     //
  853. ' //////////////////////////////////////////////////////////////////////
  854.  
  855.  
  856. '  begin_ntddk begin_nthal begin_ntifs
  857. '
  858. '   The following are masks for the predefined standard access types
  859.  
  860. '  AccessSystemAcl access type
  861.  
  862. Const ACCESS_SYSTEM_SECURITY = &H1000000
  863.  
  864. '  MaximumAllowed access type
  865.  
  866. Const MAXIMUM_ALLOWED = &H2000000
  867.  
  868. '   These are the generic rights.
  869.  
  870. Const GENERIC_READ = &H80000000
  871. Const GENERIC_WRITE = &H40000000
  872. Const GENERIC_EXECUTE = &H20000000
  873. Const GENERIC_ALL = &H10000000
  874.  
  875. '   Define the generic mapping array.  This is used to denote the
  876. '   mapping of each generic access right to a specific access mask.
  877.  
  878. Type GENERIC_MAPPING
  879.         GenericRead As Long
  880.         GenericWrite As Long
  881.         GenericExecute As Long
  882.         GenericAll As Long
  883. End Type
  884.  
  885.  
  886. ' //////////////////////////////////////////////////////////////////////
  887. '                                                                     //
  888. '                         LUID_AND_ATTRIBUTES                         //
  889. '                                                                     //
  890. ' //////////////////////////////////////////////////////////////////////
  891. '
  892. Type LUID
  893.     LowPart As Long
  894.     HighPart As Long
  895. End Type
  896.  
  897.  
  898. Type LUID_AND_ATTRIBUTES
  899.         pLuid As LUID
  900.         Attributes As Long
  901. End Type
  902.  
  903. ' //////////////////////////////////////////////////////////////////////
  904. '                                                                     //
  905. '                          ACL  and  ACE                              //
  906. '                                                                     //
  907. ' //////////////////////////////////////////////////////////////////////
  908.  
  909. '
  910. '   Define an ACL and the ACE format.  The structure of an ACL header
  911. '   followed by one or more ACEs.  Pictorally the structure of an ACL header
  912. '   is as follows:
  913. '
  914. '   The current AclRevision is defined to be ACL_REVISION.
  915. '
  916. '   AclSize is the size, in bytes, allocated for the ACL.  This includes
  917. '   the ACL header, ACES, and remaining free space in the buffer.
  918. '
  919. '   AceCount is the number of ACES in the ACL.
  920. '
  921.  
  922. '  begin_ntddk begin_ntifs
  923. '  This is the *current* ACL revision
  924.  
  925. Const ACL_REVISION = (2)
  926.  
  927. '  This is the history of ACL revisions.  Add a new one whenever
  928. '  ACL_REVISION is updated
  929.  
  930. Const ACL_REVISION1 = (1)
  931. Const ACL_REVISION2 = (2)
  932.  
  933. Type ACL
  934.         AclRevision As Byte
  935.         Sbz1 As Byte
  936.         AclSize As Integer
  937.         AceCount As Integer
  938.         Sbz2 As Integer
  939. End Type
  940.  
  941. ' typedef ACL *PACL;
  942.  
  943. '  end_ntddk
  944.  
  945. '   The structure of an ACE is a common ace header followed by ace type
  946. '   specific data.  Pictorally the structure of the common ace header is
  947. '   as follows:
  948.  
  949. '   AceType denotes the type of the ace, there are some predefined ace
  950. '   types
  951. '
  952. '   AceSize is the size, in bytes, of ace.
  953. '
  954. '   AceFlags are the Ace flags for audit and inheritance, defined Integerly.
  955.  
  956. Type ACE_HEADER
  957.         AceType As Byte
  958.         AceFlags As Byte
  959.         AceSize As Long
  960. End Type
  961. '
  962. '   The following are the predefined ace types that go into the AceType
  963. '   field of an Ace header.
  964.  
  965. Const ACCESS_ALLOWED_ACE_TYPE = &H0
  966. Const ACCESS_DENIED_ACE_TYPE = &H1
  967. Const SYSTEM_AUDIT_ACE_TYPE = &H2
  968. Const SYSTEM_ALARM_ACE_TYPE = &H3
  969.  
  970. '   The following are the inherit flags that go into the AceFlags field
  971. '   of an Ace header.
  972.  
  973. Const OBJECT_INHERIT_ACE = &H1
  974. Const CONTAINER_INHERIT_ACE = &H2
  975. Const NO_PROPAGATE_INHERIT_ACE = &H4
  976. Const INHERIT_ONLY_ACE = &H8
  977. Const VALID_INHERIT_FLAGS = &HF
  978.  
  979.  
  980. '   The following are the currently defined ACE flags that go into the
  981. '   AceFlags field of an ACE header.  Each ACE type has its own set of
  982. '   AceFlags.
  983. '
  984. '   SUCCESSFUL_ACCESS_ACE_FLAG - used only with system audit and alarm ACE
  985. '   types to indicate that a message is generated for successful accesses.
  986. '
  987. '   FAILED_ACCESS_ACE_FLAG - used only with system audit and alarm ACE types
  988. '   to indicate that a message is generated for failed accesses.
  989.  
  990. '   SYSTEM_AUDIT and SYSTEM_ALARM AceFlags
  991. '
  992. '   These control the signaling of audit and alarms for success or failure.
  993.  
  994. Const SUCCESSFUL_ACCESS_ACE_FLAG = &H40
  995. Const FAILED_ACCESS_ACE_FLAG = &H80
  996.  
  997.  
  998. '
  999. '   We'll define the structure of the predefined ACE types.  Pictorally
  1000. '   the structure of the predefined ACE's is as follows:
  1001.  
  1002. '   Mask is the access mask associated with the ACE.  This is either the
  1003. '   access allowed, access denied, audit, or alarm mask.
  1004. '
  1005. '   Sid is the Sid associated with the ACE.
  1006. '
  1007. '   The following are the four predefined ACE types.
  1008. '   Examine the AceType field in the Header to determine
  1009. '   which structure is appropriate to use for casting.
  1010.  
  1011.  
  1012. Type ACCESS_ALLOWED_ACE
  1013.         Header As ACE_HEADER
  1014.         Mask As Long
  1015.         SidStart As Long
  1016. End Type
  1017.  
  1018. Type ACCESS_DENIED_ACE
  1019.         Header As ACE_HEADER
  1020.         Mask As Long
  1021.         SidStart As Long
  1022. End Type
  1023.  
  1024.  
  1025. Type SYSTEM_AUDIT_ACE
  1026.         Header As ACE_HEADER
  1027.         Mask As Long
  1028.         SidStart As Long
  1029. End Type
  1030.  
  1031. Type SYSTEM_ALARM_ACE
  1032.         Header As ACE_HEADER
  1033.         Mask As Long
  1034.         SidStart As Long
  1035. End Type
  1036.  
  1037. '   The following declarations are used for setting and querying information
  1038. '   about and ACL.  First are the various information classes available to
  1039. '   the user.
  1040. '
  1041.  
  1042. Const AclRevisionInformation = 1
  1043. Const AclSizeInformation = 2
  1044. '
  1045. '   This record is returned/sent if the user is requesting/setting the
  1046. '   AclRevisionInformation
  1047. '
  1048.  
  1049. Type ACL_REVISION_INFORMATION
  1050.         AclRevision As Long
  1051. End Type
  1052.  
  1053. '
  1054. '   This record is returned if the user is requesting AclSizeInformation
  1055. '
  1056.  
  1057. Type ACL_SIZE_INFORMATION
  1058.         AceCount As Long
  1059.         AclBytesInUse As Long
  1060.         AclBytesFree As Long
  1061. End Type
  1062.  
  1063. ' //////////////////////////////////////////////////////////////////////
  1064. '                                                                     //
  1065. '                              SECURITY_DESCRIPTOR                    //
  1066. '                                                                     //
  1067. ' //////////////////////////////////////////////////////////////////////
  1068. '
  1069. '   Define the Security Descriptor and related data types.
  1070. '   This is an opaque data structure.
  1071. '
  1072.  
  1073. '  begin_ntddk begin_ntifs
  1074. '
  1075. '  Current security descriptor revision value
  1076. '
  1077.  
  1078. Const SECURITY_DESCRIPTOR_REVISION = (1)
  1079. Const SECURITY_DESCRIPTOR_REVISION1 = (1)
  1080.  
  1081. '  end_ntddk
  1082.  
  1083. '
  1084. '  Minimum length, in bytes, needed to build a security descriptor
  1085. '  (NOTE: This must manually be kept consistent with the)
  1086. '  (sizeof(SECURITY_DESCRIPTOR)                         )
  1087. '
  1088.  
  1089. Const SECURITY_DESCRIPTOR_MIN_LENGTH = (20)
  1090.  
  1091.  
  1092.  
  1093. Const SE_OWNER_DEFAULTED = &H1
  1094. Const SE_GROUP_DEFAULTED = &H2
  1095. Const SE_DACL_PRESENT = &H4
  1096. Const SE_DACL_DEFAULTED = &H8
  1097. Const SE_SACL_PRESENT = &H10
  1098. Const SE_SACL_DEFAULTED = &H20
  1099. Const SE_SELF_RELATIVE = &H8000
  1100.  
  1101. '
  1102. '   Where:
  1103. '
  1104. '       SE_OWNER_DEFAULTED - This boolean flag, when set, indicates that the
  1105. '           SID pointed to by the Owner field was provided by a
  1106. '           defaulting mechanism rather than explicitly provided by the
  1107. '           original provider of the security descriptor.  This may
  1108. '           affect the treatment of the SID with respect to inheritence
  1109. '           of an owner.
  1110. '
  1111. '       SE_GROUP_DEFAULTED - This boolean flag, when set, indicates that the
  1112. '           SID in the Group field was provided by a defaulting mechanism
  1113. '           rather than explicitly provided by the original provider of
  1114. '           the security descriptor.  This may affect the treatment of
  1115. '           the SID with respect to inheritence of a primary group.
  1116. '
  1117. '       SE_DACL_PRESENT - This boolean flag, when set, indicates that the
  1118. '           security descriptor contains a discretionary ACL.  If this
  1119. '           flag is set and the Dacl field of the SECURITY_DESCRIPTOR is
  1120. '           null, then a null ACL is explicitly being specified.
  1121. '
  1122. '       SE_DACL_DEFAULTED - This boolean flag, when set, indicates that the
  1123. '           ACL pointed to by the Dacl field was provided by a defaulting
  1124. '           mechanism rather than explicitly provided by the original
  1125. '           provider of the security descriptor.  This may affect the
  1126. '           treatment of the ACL with respect to inheritence of an ACL.
  1127. '           This flag is ignored if the DaclPresent flag is not set.
  1128. '
  1129. '       SE_SACL_PRESENT - This boolean flag, when set,  indicates that the
  1130. '           security descriptor contains a system ACL pointed to by the
  1131. '           Sacl field.  If this flag is set and the Sacl field of the
  1132. '           SECURITY_DESCRIPTOR is null, then an empty (but present)
  1133. '           ACL is being specified.
  1134. '
  1135. '       SE_SACL_DEFAULTED - This boolean flag, when set, indicates that the
  1136. '           ACL pointed to by the Sacl field was provided by a defaulting
  1137. '           mechanism rather than explicitly provided by the original
  1138. '           provider of the security descriptor.  This may affect the
  1139. '           treatment of the ACL with respect to inheritence of an ACL.
  1140. '           This flag is ignored if the SaclPresent flag is not set.
  1141. '
  1142. '       SE_SELF_RELATIVE - This boolean flag, when set, indicates that the
  1143. '           security descriptor is in self-relative form.  In this form,
  1144. '           all fields of the security descriptor are contiguous in memory
  1145. '           and all pointer fields are expressed as offsets from the
  1146. '           beginning of the security descriptor.  This form is useful
  1147. '           for treating security descriptors as opaque data structures
  1148. '           for transmission in communication protocol or for storage on
  1149. '           secondary media.
  1150. '
  1151. '
  1152. '
  1153. '  In general, this data structure should be treated opaquely to ensure future
  1154. '  compatibility.
  1155. '
  1156. '
  1157.  
  1158. Type SECURITY_DESCRIPTOR
  1159.         Revision As Byte
  1160.         Sbz1 As Byte
  1161.         Control As Long
  1162.         Owner As Long
  1163.         Group As Long
  1164.         Sacl As ACL
  1165.         Dacl As ACL
  1166. End Type
  1167.  
  1168.  
  1169. '  Where:
  1170. '
  1171. '      Revision - Contains the revision level of the security
  1172. '          descriptor.  This allows this structure to be passed between
  1173. '          systems or stored on disk even though it is expected to
  1174. '          change in the future.
  1175. '
  1176. '      Control - A set of flags which qualify the meaning of the
  1177. '          security descriptor or individual fields of the security
  1178. '          descriptor.
  1179. '
  1180. '      Owner - is a pointer to an SID representing an object's owner.
  1181. '          If this field is null, then no owner SID is present in the
  1182. '          security descriptor.  If the security descriptor is in
  1183. '          self-relative form, then this field contains an offset to
  1184. '          the SID, rather than a pointer.
  1185. '
  1186. '      Group - is a pointer to an SID representing an object's primary
  1187. '          group.  If this field is null, then no primary group SID is
  1188. '          present in the security descriptor.  If the security descriptor
  1189. '          is in self-relative form, then this field contains an offset to
  1190. '          the SID, rather than a pointer.
  1191. '
  1192. '      Sacl - is a pointer to a system ACL.  This field value is only
  1193. '          valid if the DaclPresent control flag is set.  If the
  1194. '          SaclPresent flag is set and this field is null, then a null
  1195. '          ACL  is specified.  If the security descriptor is in
  1196. '          self-relative form, then this field contains an offset to
  1197. '          the ACL, rather than a pointer.
  1198. '
  1199. '      Dacl - is a pointer to a discretionary ACL.  This field value is
  1200. '          only valid if the DaclPresent control flag is set.  If the
  1201. '          DaclPresent flag is set and this field is null, then a null
  1202. '          ACL (unconditionally granting access) is specified.  If the
  1203. '          security descriptor is in self-relative form, then this field
  1204. '          contains an offset to the ACL, rather than a pointer.
  1205. '
  1206.  
  1207.  
  1208.  
  1209. ' //////////////////////////////////////////////////////////////////////
  1210. '                                                                     //
  1211. '                Privilege Related Data Structures                    //
  1212. '                                                                     //
  1213. ' //////////////////////////////////////////////////////////////////////
  1214.  
  1215.  
  1216. '  Privilege attributes
  1217. '
  1218.  
  1219. Const SE_PRIVILEGE_ENABLED_BY_DEFAULT = &H1
  1220. Const SE_PRIVILEGE_ENABLED = &H2
  1221. Const SE_PRIVILEGE_USED_FOR_ACCESS = &H80000000
  1222.  
  1223. '
  1224. '  Privilege Set Control flags
  1225. '
  1226.  
  1227. Const PRIVILEGE_SET_ALL_NECESSARY = (1)
  1228.  
  1229. '
  1230. '   Privilege Set - This is defined for a privilege set of one.
  1231. '                   If more than one privilege is needed, then this structure
  1232. '                   will need to be allocated with more space.
  1233. '
  1234. '   Note: don't change this structure without fixing the INITIAL_PRIVILEGE_SET
  1235. '   structure (defined in se.h)
  1236. '
  1237.  
  1238. Type PRIVILEGE_SET
  1239.         PrivilegeCount As Long
  1240.         Control As Long
  1241.         Privilege(ANYSIZE_ARRAY) As LUID_AND_ATTRIBUTES
  1242. End Type
  1243.  
  1244.  
  1245. '//////////////////////////////////////////////////////////////////////
  1246. '                                                                     //
  1247. '                NT Defined Privileges                                //
  1248. '                                                                     //
  1249. ' //////////////////////////////////////////////////////////////////////
  1250.  
  1251. Const SE_CREATE_TOKEN_NAME = "SeCreateTokenPrivilege"
  1252. Const SE_ASSIGNPRIMARYTOKEN_NAME = "SeAssignPrimaryTokenPrivilege"
  1253. Const SE_LOCK_MEMORY_NAME = "SeLockMemoryPrivilege"
  1254. Const SE_INCREASE_QUOTA_NAME = "SeIncreaseQuotaPrivilege"
  1255. Const SE_UNSOLICITED_INPUT_NAME = "SeUnsolicitedInputPrivilege"
  1256. Const SE_MACHINE_ACCOUNT_NAME = "SeMachineAccountPrivilege"
  1257. Const SE_TCB_NAME = "SeTcbPrivilege"
  1258. Const SE_SECURITY_NAME = "SeSecurityPrivilege"
  1259. Const SE_TAKE_OWNERSHIP_NAME = "SeTakeOwnershipPrivilege"
  1260. Const SE_LOAD_DRIVER_NAME = "SeLoadDriverPrivilege"
  1261. Const SE_SYSTEM_PROFILE_NAME = "SeSystemProfilePrivilege"
  1262. Const SE_SYSTEMTIME_NAME = "SeSystemtimePrivilege"
  1263. Const SE_PROF_SINGLE_PROCESS_NAME = "SeProfileSingleProcessPrivilege"
  1264. Const SE_INC_BASE_PRIORITY_NAME = "SeIncreaseBasePriorityPrivilege"
  1265. Const SE_CREATE_PAGEFILE_NAME = "SeCreatePagefilePrivilege"
  1266. Const SE_CREATE_PERMANENT_NAME = "SeCreatePermanentPrivilege"
  1267. Const SE_BACKUP_NAME = "SeBackupPrivilege"
  1268. Const SE_RESTORE_NAME = "SeRestorePrivilege"
  1269. Const SE_SHUTDOWN_NAME = "SeShutdownPrivilege"
  1270. Const SE_DEBUG_NAME = "SeDebugPrivilege"
  1271. Const SE_AUDIT_NAME = "SeAuditPrivilege"
  1272. Const SE_SYSTEM_ENVIRONMENT_NAME = "SeSystemEnvironmentPrivilege"
  1273. Const SE_CHANGE_NOTIFY_NAME = "SeChangeNotifyPrivilege"
  1274. Const SE_REMOTE_SHUTDOWN_NAME = "SeRemoteShutdownPrivilege"
  1275.  
  1276.  
  1277. ' //////////////////////////////////////////////////////////////////
  1278. '                                                                 //
  1279. '            Security Quality Of Service                          //
  1280. '                                                                 //
  1281. '                                                                 //
  1282. ' //////////////////////////////////////////////////////////////////
  1283.  
  1284. '  begin_ntddk begin_nthal begin_ntifs
  1285. '
  1286. '  Impersonation Level
  1287. '
  1288. '  Impersonation level is represented by a pair of bits in Windows.
  1289. '  If a new impersonation level is added or lowest value is changed from
  1290. '  0 to something else, fix the Windows CreateFile call.
  1291. '
  1292.  
  1293. Const SecurityAnonymous = 1
  1294. Const SecurityIdentification = 2
  1295.  
  1296. '//////////////////////////////////////////////////////////////////////
  1297. '                                                                     //
  1298. '                Registry API Constants                                //
  1299. '                                                                     //
  1300. ' //////////////////////////////////////////////////////////////////////
  1301.  
  1302. ' Reg Data Types...
  1303. Const REG_NONE = 0                       ' No value type
  1304. Const REG_SZ = 1                         ' Unicode nul terminated string
  1305. Const REG_EXPAND_SZ = 2                  ' Unicode nul terminated string
  1306. Const REG_BINARY = 3                     ' Free form binary
  1307. Const REG_DWORD = 4                      ' 32-bit number
  1308. Const REG_DWORD_LITTLE_ENDIAN = 4        ' 32-bit number (same as REG_DWORD)
  1309. Const REG_DWORD_BIG_ENDIAN = 5           ' 32-bit number
  1310. Const REG_LINK = 6                       ' Symbolic Link (unicode)
  1311. Const REG_MULTI_SZ = 7                   ' Multiple Unicode strings
  1312. Const REG_RESOURCE_LIST = 8              ' Resource list in the resource map
  1313. Const REG_FULL_RESOURCE_DESCRIPTOR = 9   ' Resource list in the hardware description
  1314. Const REG_RESOURCE_REQUIREMENTS_LIST = 10
  1315. Const REG_CREATED_NEW_KEY = &H1                      ' New Registry Key created
  1316. Const REG_OPENED_EXISTING_KEY = &H2                      ' Existing Key opened
  1317. Const REG_WHOLE_HIVE_VOLATILE = &H1                      ' Restore whole hive volatile
  1318. Const REG_REFRESH_HIVE = &H2                      ' Unwind changes to last flush
  1319. Const REG_NOTIFY_CHANGE_NAME = &H1                      ' Create or delete (child)
  1320. Const REG_NOTIFY_CHANGE_ATTRIBUTES = &H2
  1321. Const REG_NOTIFY_CHANGE_LAST_SET = &H4                      ' Time stamp
  1322. Const REG_NOTIFY_CHANGE_SECURITY = &H8
  1323. Const REG_LEGAL_CHANGE_FILTER = (REG_NOTIFY_CHANGE_NAME Or REG_NOTIFY_CHANGE_ATTRIBUTES Or REG_NOTIFY_CHANGE_LAST_SET Or REG_NOTIFY_CHANGE_SECURITY)
  1324. Const REG_LEGAL_OPTION = (REG_OPTION_RESERVED Or REG_OPTION_NON_VOLATILE Or REG_OPTION_VOLATILE Or REG_OPTION_CREATE_LINK Or REG_OPTION_BACKUP_RESTORE)
  1325.  
  1326. ' Reg Create Type Values...
  1327. Const REG_OPTION_RESERVED = 0           ' Parameter is reserved
  1328. Const REG_OPTION_NON_VOLATILE = 0       ' Key is preserved when system is rebooted
  1329. Const REG_OPTION_VOLATILE = 1           ' Key is not preserved when system is rebooted
  1330. Const REG_OPTION_CREATE_LINK = 2        ' Created key is a symbolic link
  1331. Const REG_OPTION_BACKUP_RESTORE = 4     ' open for backup or restore
  1332.  
  1333. ' Reg Key Security Options
  1334. ' Const READ_CONTROL = &H20000
  1335. Const KEY_QUERY_VALUE = &H1
  1336. Const KEY_SET_VALUE = &H2
  1337. Const KEY_CREATE_SUB_KEY = &H4
  1338. Const KEY_ENUMERATE_SUB_KEYS = &H8
  1339. Const KEY_NOTIFY = &H10
  1340. Const KEY_CREATE_LINK = &H20
  1341. Const KEY_READ = ((STANDARD_RIGHTS_READ Or KEY_QUERY_VALUE Or KEY_ENUMERATE_SUB_KEYS Or KEY_NOTIFY) And (Not SYNCHRONIZE))
  1342. Const KEY_WRITE = ((STANDARD_RIGHTS_WRITE Or KEY_SET_VALUE Or KEY_CREATE_SUB_KEY) And (Not SYNCHRONIZE))
  1343. Const KEY_ALL_ACCESS = ((STANDARD_RIGHTS_ALL Or KEY_QUERY_VALUE Or KEY_SET_VALUE Or KEY_CREATE_SUB_KEY Or KEY_ENUMERATE_SUB_KEYS Or KEY_NOTIFY Or KEY_CREATE_LINK) And (Not SYNCHRONIZE))
  1344. 'Const STANDARD_RIGHTS_READ = (READ_CONTROL)
  1345. 'Const STANDARD_RIGHTS_WRITE = (READ_CONTROL)
  1346. Const KEY_EXECUTE = ((KEY_READ) And (Not SYNCHRONIZE))
  1347.  
  1348. ' end winnt.txt
  1349.  
  1350. ' Debug APIs
  1351. Const EXCEPTION_DEBUG_EVENT = 1
  1352. Const CREATE_THREAD_DEBUG_EVENT = 2
  1353. Const CREATE_PROCESS_DEBUG_EVENT = 3
  1354. Const EXIT_THREAD_DEBUG_EVENT = 4
  1355. Const EXIT_PROCESS_DEBUG_EVENT = 5
  1356. Const LOAD_DLL_DEBUG_EVENT = 6
  1357. Const UNLOAD_DLL_DEBUG_EVENT = 7
  1358. Const OUTPUT_DEBUG_STRING_EVENT = 8
  1359. Const RIP_EVENT = 9
  1360.  
  1361. Const EXCEPTION_MAXIMUM_PARAMETERS = 15
  1362.  
  1363. Type EXCEPTION_RECORD
  1364.     ExceptionCode As Long
  1365.     ExceptionFlags As Long
  1366.     pExceptionRecord As Long    ' Pointer to an EXCEPTION_RECORD structure
  1367.     ExceptionAddress As Long
  1368.     NumberParameters As Long
  1369.     ExceptionInformation(EXCEPTION_MAXIMUM_PARAMETERS) As Long
  1370. End Type
  1371.  
  1372. Type EXCEPTION_DEBUG_INFO
  1373.         pExceptionRecord As EXCEPTION_RECORD
  1374.         dwFirstChance As Long
  1375. End Type
  1376.  
  1377. Type CREATE_THREAD_DEBUG_INFO
  1378.         hThread As Long
  1379.         lpThreadLocalBase As Long
  1380.         lpStartAddress As Long
  1381. End Type
  1382.  
  1383. Type CREATE_PROCESS_DEBUG_INFO
  1384.         hFile As Long
  1385.         hProcess As Long
  1386.         hThread As Long
  1387.         lpBaseOfImage As Long
  1388.         dwDebugInfoFileOffset As Long
  1389.         nDebugInfoSize As Long
  1390.         lpThreadLocalBase As Long
  1391.         lpStartAddress As Long
  1392.         lpImageName As Long
  1393.         fUnicode As Integer
  1394. End Type
  1395.  
  1396. Type EXIT_THREAD_DEBUG_INFO
  1397.         dwExitCode As Long
  1398. End Type
  1399.  
  1400. Type EXIT_PROCESS_DEBUG_INFO
  1401.         dwExitCode As Long
  1402. End Type
  1403.  
  1404. Type LOAD_DLL_DEBUG_INFO
  1405.         hFile As Long
  1406.         lpBaseOfDll As Long
  1407.         dwDebugInfoFileOffset As Long
  1408.         nDebugInfoSize As Long
  1409.         lpImageName As Long
  1410.         fUnicode As Integer
  1411. End Type
  1412.  
  1413. Type UNLOAD_DLL_DEBUG_INFO
  1414.         lpBaseOfDll As Long
  1415. End Type
  1416.  
  1417. Type OUTPUT_DEBUG_STRING_INFO
  1418.         lpDebugStringData As String
  1419.         fUnicode As Integer
  1420.         nDebugStringLength As Integer
  1421. End Type
  1422.  
  1423. Type RIP_INFO
  1424.         dwError As Long
  1425.         dwType As Long
  1426. End Type
  1427.  
  1428. ' GetDriveType return values
  1429. Const DRIVE_REMOVABLE = 2
  1430. Const DRIVE_FIXED = 3
  1431. Const DRIVE_REMOTE = 4
  1432. Const DRIVE_CDROM = 5
  1433. Const DRIVE_RAMDISK = 6
  1434.  
  1435. Const FILE_TYPE_UNKNOWN = &H0
  1436. Const FILE_TYPE_DISK = &H1
  1437. Const FILE_TYPE_CHAR = &H2
  1438. Const FILE_TYPE_PIPE = &H3
  1439. Const FILE_TYPE_REMOTE = &H8000
  1440.  
  1441. Const STD_INPUT_HANDLE = -10&
  1442. Const STD_OUTPUT_HANDLE = -11&
  1443. Const STD_ERROR_HANDLE = -12&
  1444.  
  1445. Const NOPARITY = 0
  1446. Const ODDPARITY = 1
  1447. Const EVENPARITY = 2
  1448. Const MARKPARITY = 3
  1449. Const SPACEPARITY = 4
  1450.  
  1451. Const ONESTOPBIT = 0
  1452. Const ONE5STOPBITS = 1
  1453. Const TWOSTOPBITS = 2
  1454.  
  1455. Const IGNORE = 0 '  Ignore signal
  1456. Const INFINITE = &HFFFF      '  Infinite timeout
  1457.  
  1458. ' Comm Baud Rate indices
  1459. Const CBR_110 = 110
  1460. Const CBR_300 = 300
  1461. Const CBR_600 = 600
  1462. Const CBR_1200 = 1200
  1463. Const CBR_2400 = 2400
  1464. Const CBR_4800 = 4800
  1465. Const CBR_9600 = 9600
  1466. Const CBR_14400 = 14400
  1467. Const CBR_19200 = 19200
  1468. Const CBR_38400 = 38400
  1469. Const CBR_56000 = 56000
  1470. Const CBR_57600 = 57600
  1471. Const CBR_115200 = 115200
  1472. Const CBR_128000 = 128000
  1473. Const CBR_256000 = 256000
  1474.  
  1475. ' Error Flags
  1476. Const CE_RXOVER = &H1                '  Receive Queue overflow
  1477. Const CE_OVERRUN = &H2               '  Receive Overrun Error
  1478. Const CE_RXPARITY = &H4              '  Receive Parity Error
  1479. Const CE_FRAME = &H8                 '  Receive Framing error
  1480. Const CE_BREAK = &H10                '  Break Detected
  1481. Const CE_TXFULL = &H100              '  TX Queue is full
  1482. Const CE_PTO = &H200                 '  LPTx Timeout
  1483. Const CE_IOE = &H400                 '  LPTx I/O Error
  1484. Const CE_DNS = &H800                 '  LPTx Device not selected
  1485. Const CE_OOP = &H1000                '  LPTx Out-Of-Paper
  1486. Const CE_MODE = &H8000               '  Requested mode unsupported
  1487.  
  1488. Const IE_BADID = (-1)                '  Invalid or unsupported id
  1489. Const IE_OPEN = (-2)                 '  Device Already Open
  1490. Const IE_NOPEN = (-3)                '  Device Not Open
  1491. Const IE_MEMORY = (-4)               '  Unable to allocate queues
  1492. Const IE_DEFAULT = (-5)              '  Error in default parameters
  1493. Const IE_HARDWARE = (-10)            '  Hardware Not Present
  1494. Const IE_BYTESIZE = (-11)            '  Illegal Byte Size
  1495. Const IE_BAUDRATE = (-12)            '  Unsupported BaudRate
  1496.  
  1497. ' Events
  1498. Const EV_RXCHAR = &H1                '  Any Character received
  1499. Const EV_RXFLAG = &H2                '  Received certain character
  1500. Const EV_TXEMPTY = &H4               '  Transmitt Queue Empty
  1501. Const EV_CTS = &H8                   '  CTS changed state
  1502. Const EV_DSR = &H10                  '  DSR changed state
  1503. Const EV_RLSD = &H20                 '  RLSD changed state
  1504. Const EV_BREAK = &H40                '  BREAK received
  1505. Const EV_ERR = &H80                  '  Line status error occurred
  1506. Const EV_RING = &H100                '  Ring signal detected
  1507. Const EV_PERR = &H200                '  Printer error occured
  1508. Const EV_RX80FULL = &H400            '  Receive buffer is 80 percent full
  1509. Const EV_EVENT1 = &H800              '  Provider specific event 1
  1510. Const EV_EVENT2 = &H1000             '  Provider specific event 2
  1511.  
  1512. ' Escape Functions
  1513. Const SETXOFF = 1  '  Simulate XOFF received
  1514. Const SETXON = 2 '  Simulate XON received
  1515. Const SETRTS = 3 '  Set RTS high
  1516. Const CLRRTS = 4 '  Set RTS low
  1517. Const SETDTR = 5 '  Set DTR high
  1518. Const CLRDTR = 6 '  Set DTR low
  1519. Const RESETDEV = 7       '  Reset device if possible
  1520. Const SETBREAK = 8  'Set the device break line
  1521. Const CLRBREAK = 9 ' Clear the device break line
  1522.  
  1523. '  PURGE function flags.
  1524. Const PURGE_TXABORT = &H1     '  Kill the pending/current writes to the comm port.
  1525. Const PURGE_RXABORT = &H2     '  Kill the pending/current reads to the comm port.
  1526. Const PURGE_TXCLEAR = &H4     '  Kill the transmit queue if there.
  1527. Const PURGE_RXCLEAR = &H8     '  Kill the typeahead buffer if there.
  1528.  
  1529. Const LPTx = &H80        '  Set if ID is for LPT device
  1530.  
  1531. '  Modem Status Flags
  1532. Const MS_CTS_ON = &H10&
  1533. Const MS_DSR_ON = &H20&
  1534. Const MS_RING_ON = &H40&
  1535. Const MS_RLSD_ON = &H80&
  1536.  
  1537. ' WaitSoundState() Constants
  1538. Const S_QUEUEEMPTY = 0
  1539. Const S_THRESHOLD = 1
  1540. Const S_ALLTHRESHOLD = 2
  1541.  
  1542. ' Accent Modes
  1543. Const S_NORMAL = 0
  1544. Const S_LEGATO = 1
  1545. Const S_STACCATO = 2
  1546.  
  1547. ' SetSoundNoise() Sources
  1548. Const S_PERIOD512 = 0    '  Freq = N/512 high pitch, less coarse hiss
  1549. Const S_PERIOD1024 = 1   '  Freq = N/1024
  1550. Const S_PERIOD2048 = 2   '  Freq = N/2048 low pitch, more coarse hiss
  1551. Const S_PERIODVOICE = 3  '  Source is frequency from voice channel (3)
  1552. Const S_WHITE512 = 4     '  Freq = N/512 high pitch, less coarse hiss
  1553. Const S_WHITE1024 = 5    '  Freq = N/1024
  1554. Const S_WHITE2048 = 6    '  Freq = N/2048 low pitch, more coarse hiss
  1555. Const S_WHITEVOICE = 7   '  Source is frequency from voice channel (3)
  1556.  
  1557. Const S_SERDVNA = (-1)   '  Device not available
  1558. Const S_SEROFM = (-2)    '  Out of memory
  1559. Const S_SERMACT = (-3)   '  Music active
  1560. Const S_SERQFUL = (-4)   '  Queue full
  1561. Const S_SERBDNT = (-5)   '  Invalid note
  1562. Const S_SERDLN = (-6)    '  Invalid note length
  1563. Const S_SERDCC = (-7)    '  Invalid note count
  1564. Const S_SERDTP = (-8)    '  Invalid tempo
  1565. Const S_SERDVL = (-9)    '  Invalid volume
  1566. Const S_SERDMD = (-10)   '  Invalid mode
  1567. Const S_SERDSH = (-11)   '  Invalid shape
  1568. Const S_SERDPT = (-12)   '  Invalid pitch
  1569. Const S_SERDFQ = (-13)   '  Invalid frequency
  1570. Const S_SERDDR = (-14)   '  Invalid duration
  1571. Const S_SERDSR = (-15)   '  Invalid source
  1572. Const S_SERDST = (-16)   '  Invalid state
  1573.  
  1574. Const NMPWAIT_WAIT_FOREVER = &HFFFF
  1575. Const NMPWAIT_NOWAIT = &H1
  1576. Const NMPWAIT_USE_DEFAULT_WAIT = &H0
  1577. Const FS_CASE_IS_PRESERVED = FILE_CASE_PRESERVED_NAMES
  1578. Const FS_CASE_SENSITIVE = FILE_CASE_SENSITIVE_SEARCH
  1579. Const FS_UNICODE_STORED_ON_DISK = FILE_UNICODE_ON_DISK
  1580. Const FS_PERSISTENT_ACLS = FILE_PERSISTENT_ACLS
  1581.  
  1582. Const SECTION_QUERY = &H1
  1583. Const SECTION_MAP_WRITE = &H2
  1584. Const SECTION_MAP_READ = &H4
  1585. Const SECTION_MAP_EXECUTE = &H8
  1586. Const SECTION_EXTEND_SIZE = &H10
  1587. Const SECTION_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED Or SECTION_QUERY Or SECTION_MAP_WRITE Or SECTION_MAP_READ Or SECTION_MAP_EXECUTE Or SECTION_EXTEND_SIZE
  1588.  
  1589. Const FILE_MAP_COPY = SECTION_QUERY
  1590. Const FILE_MAP_WRITE = SECTION_MAP_WRITE
  1591. Const FILE_MAP_READ = SECTION_MAP_READ
  1592. Const FILE_MAP_ALL_ACCESS = SECTION_ALL_ACCESS
  1593.  
  1594. ' OpenFile() Flags
  1595. Const OF_READ = &H0
  1596. Const OF_WRITE = &H1
  1597. Const OF_READWRITE = &H2
  1598. Const OF_SHARE_COMPAT = &H0
  1599. Const OF_SHARE_EXCLUSIVE = &H10
  1600. Const OF_SHARE_DENY_WRITE = &H20
  1601. Const OF_SHARE_DENY_READ = &H30
  1602. Const OF_SHARE_DENY_NONE = &H40
  1603. Const OF_PARSE = &H100
  1604. Const OF_DELETE = &H200
  1605. Const OF_VERIFY = &H400
  1606. Const OF_CANCEL = &H800
  1607. Const OF_CREATE = &H1000
  1608. Const OF_PROMPT = &H2000
  1609. Const OF_EXIST = &H4000
  1610. Const OF_REOPEN = &H8000
  1611.  
  1612. Const OFS_MAXPATHNAME = 128
  1613.  
  1614. ' OpenFile() Structure
  1615. Type OFSTRUCT
  1616.         cBytes As Byte
  1617.         fFixedDisk As Byte
  1618.         nErrCode As Integer
  1619.         Reserved1 As Integer
  1620.         Reserved2 As Integer
  1621.         szPathName(OFS_MAXPATHNAME) As Byte
  1622. End Type
  1623.  
  1624. Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)
  1625.  
  1626. Const PROCESSOR_INTEL_386 = 386
  1627. Const PROCESSOR_INTEL_486 = 486
  1628. Const PROCESSOR_INTEL_PENTIUM = 586
  1629. Const PROCESSOR_MIPS_R4000 = 4000
  1630. Const PROCESSOR_ALPHA_21064 = 21064
  1631. Const PROCESSOR_ARCHITECTURE_INTEL = 0
  1632. Const PROCESSOR_ARCHITECTURE_MIPS = 1
  1633. Const PROCESSOR_ARCHITECTURE_ALPHA = 2
  1634. Const PROCESSOR_ARCHITECTURE_PPC = 3
  1635. Const PROCESSOR_ARCHITECTURE_UNKNOWN = &hFFFF
  1636.  
  1637. Declare Function GetCurrentTime Lib "kernel32" Alias "GetTickCount" () As Long
  1638.  
  1639. ' Flags for DrawFrameControl
  1640. Const DFC_CAPTION = 1
  1641. Const DFC_MENU = 2
  1642. Const DFC_SCROLL = 3
  1643. Const DFC_BUTTON = 4
  1644. Const DFCS_CAPTIONCLOSE = &H0
  1645. Const DFCS_CAPTIONMIN = &H1
  1646. Const DFCS_CAPTIONMAX = &H2
  1647. Const DFCS_CAPTIONRESTORE = &H3
  1648. Const DFCS_CAPTIONHELP = &H4
  1649. Const DFCS_MENUARROW = &H0
  1650. Const DFCS_MENUCHECK = &H1
  1651. Const DFCS_MENUBULLET = &H2
  1652. Const DFCS_MENUARROWRIGHT = &H4
  1653. Const DFCS_SCROLLUP = &H0
  1654. Const DFCS_SCROLLDOWN = &H1
  1655. Const DFCS_SCROLLLEFT = &H2
  1656. Const DFCS_SCROLLRIGHT = &H3
  1657. Const DFCS_SCROLLCOMBOBOX = &H5
  1658. Const DFCS_SCROLLSIZEGRIP = &H8
  1659. Const DFCS_SCROLLSIZEGRIPRIGHT = &H10
  1660. Const DFCS_BUTTONCHECK = &H0
  1661. Const DFCS_BUTTONRADIOIMAGE = &H1
  1662. Const DFCS_BUTTONRADIOMASK = &H2
  1663. Const DFCS_BUTTONRADIO = &H4
  1664. Const DFCS_BUTTON3STATE = &H8
  1665. Const DFCS_BUTTONPUSH = &H10
  1666. Const DFCS_INACTIVE = &H100
  1667. Const DFCS_PUSHED = &H200
  1668. Const DFCS_CHECKED = &H400
  1669. Const DFCS_ADJUSTRECT = &H2000
  1670. Const DFCS_FLAT = &H4000
  1671. Const DFCS_MONO = &H8000
  1672.  
  1673. Declare Function InterlockedIncrement Lib "kernel32" Alias "InterlockedIncrement" (lpAddend As Long) As Long
  1674. Declare Function InterlockedDecrement Lib "kernel32" Alias "InterlockedDecrement" (lpAddend As Long) As Long
  1675. Declare Function InterlockedExchange Lib "kernel32" Alias "InterlockedExchange" (Target As Long, ByVal Value As Long) As Long
  1676.  
  1677. ' Loader Routines
  1678. Declare Function GetModuleFileName Lib "kernel32" Alias "GetModuleFileNameA" (ByVal hModule As Long, ByVal lpFileName As String, ByVal nSize As Long) As Long
  1679. Declare Function GetModuleHandle Lib "kernel32" Alias "GetModuleHandleA" (ByVal lpModuleName As String) As Long
  1680.  
  1681. Declare Function CreateProcess Lib "kernel32" Alias "CreateProcessA" (ByVal lpApplicationName As String, ByVal lpCommandLine As String, lpProcessAttributes As SECURITY_ATTRIBUTES, lpThreadAttributes As SECURITY_ATTRIBUTES, ByVal bInheritHandles As Long, ByVal dwCreationFlags As Long, lpEnvironment As Any, ByVal lpCurrentDriectory As String, lpStartupInfo As STARTUPINFO, lpProcessInformation As PROCESS_INFORMATION) As Long
  1682.  
  1683. Declare Function SetProcessShutdownParameters Lib "kernel32" Alias "SetProcessShutdownParameters" (ByVal dwLevel As Long, ByVal dwFlags As Long) As Long
  1684. Declare Function GetProcessShutdownParameters Lib "kernel32" Alias "GetProcessShutdownParameters" (lpdwLevel As Long, lpdwFlags As Long) As Long
  1685.  
  1686. Declare Sub FatalAppExit Lib "kernel32" Alias "FatalAppExitA" (ByVal uAction As Long, ByVal lpMessageText As String)
  1687. Declare Sub GetStartupInfo Lib "kernel32" Alias "GetStartupInfoA" (lpStartupInfo As STARTUPINFO)
  1688. Declare Function GetCommandLine Lib "kernel32" Alias "GetCommandLineA" () As String
  1689. Declare Function GetEnvironmentVariable Lib "kernel32" Alias "GetEnvironmentVariableA" (ByVal lpName As String, ByVal lpBuffer As String, ByVal nSize As Long) As Long
  1690. Declare Function SetEnvironmentVariable Lib "kernel32" Alias "SetEnvironmentVariableA" (ByVal lpName As String, ByVal lpValue As String) As Long
  1691. Declare Function ExpandEnvironmentStrings Lib "kernel32" Alias "ExpandEnvironmentStringsA" (ByVal lpSrc As String, ByVal lpDst As String, ByVal nSize As Long) As Long
  1692.  
  1693. Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long
  1694. Declare Function LoadLibraryEx Lib "kernel32" Alias "LoadLibraryExA" (ByVal lpLibFileName As String, ByVal hFile As Long, ByVal dwFlags As Long) As Long
  1695.  
  1696. Const DONT_RESOLVE_DLL_REFERENCES = &H1
  1697.  
  1698. Declare Function LoadModule Lib "kernel32" Alias "LoadModule" (ByVal lpModuleName As String, lpParameterBlock As Any) As Long
  1699. Declare Function FreeLibrary Lib "kernel32" Alias "FreeLibrary" (ByVal hLibModule As Long) As Long
  1700. Declare Function WinExec Lib "kernel32" Alias "WinExec" (ByVal lpCmdLine As String, ByVal nCmdShow As Long) As Long
  1701.  
  1702. Declare Sub DebugBreak Lib "kernel32" Alias "DebugBreak" ()
  1703. Declare Function ContinueDebugEvent Lib "kernel32" Alias "ContinueDebugEvent" (ByVal dwProcessId As Long, ByVal dwThreadId As Long, ByVal dwContinueStatus As Long) As Long
  1704. Declare Function DebugActiveProcess Lib "kernel32" Alias "DebugActiveProcess" (ByVal dwProcessId As Long) As Long
  1705.  
  1706. Type CRITICAL_SECTION
  1707.     dummy As Long
  1708. End Type
  1709.  
  1710. Declare Sub InitializeCriticalSection Lib "kernel32" Alias "InitializeCriticalSection" (lpCriticalSection As CRITICAL_SECTION)
  1711.  
  1712. Declare Sub EnterCriticalSection Lib "kernel32" Alias "EnterCriticalSection" (lpCriticalSection As CRITICAL_SECTION)
  1713. Declare Sub LeaveCriticalSection Lib "kernel32" Alias "LeaveCriticalSection" (lpCriticalSection As CRITICAL_SECTION)
  1714. Declare Sub DeleteCriticalSection Lib "kernel32" Alias "DeleteCriticalSection" (lpCriticalSection As CRITICAL_SECTION)
  1715. Declare Function SetEvent Lib "kernel32" Alias "SetEvent" (ByVal hEvent As Long) As Long
  1716. Declare Function ResetEvent Lib "kernel32" Alias "ResetEvent" (ByVal hEvent As Long) As Long
  1717. Declare Function PulseEvent Lib "kernel32" Alias "PulseEvent" (ByVal hEvent As Long) As Long
  1718. Declare Function ReleaseSemaphore Lib "kernel32" Alias "ReleaseSemaphore" (ByVal hSemaphore As Long, ByVal lReleaseCount As Long, lpPreviousCount As Long) As Long
  1719. Declare Function ReleaseMutex Lib "kernel32" Alias "ReleaseMutex" (ByVal hMutex As Long) As Long
  1720. Declare Function WaitForSingleObject Lib "kernel32" Alias "WaitForSingleObject" (ByVal hHandle As Long, ByVal dwMilliseconds As Long) As Long
  1721. Declare Function WaitForMultipleObjects Lib "kernel32" Alias "WaitForMultipleObjects" (ByVal nCount As Long, lpHandles As Long, ByVal bWaitAll As Long, ByVal dwMilliseconds As Long) As Long
  1722. Declare Sub Sleep Lib "kernel32" Alias "Sleep" (ByVal dwMilliseconds As Long)
  1723. Declare Sub OutputDebugString Lib "kernel32" Alias "OutputDebugStringA" (ByVal lpOutputString As String)
  1724. Declare Function GetVersion Lib "kernel32" Alias "GetVersion" () As Long
  1725.  
  1726. Declare Function OpenFile Lib "kernel32" Alias "OpenFile" (ByVal lpFileName As String, lpReOpenBuff As OFSTRUCT, ByVal wStyle As Long) As Long
  1727.  
  1728. ' GetTempFileName() Flags
  1729. '
  1730. Const TF_FORCEDRIVE = &H80
  1731.  
  1732. Declare Function GetTempFileName Lib "kernel32" Alias "GetTempFileNameA" (ByVal lpszPath As String, ByVal lpPrefixString As String, ByVal wUnique As Long, ByVal lpTempFileName As String) As Long
  1733. Declare Function SetHandleCount Lib "kernel32" Alias "SetHandleCount" (ByVal wNumber As Long) As Long
  1734. Declare Function GetLogicalDrives Lib "kernel32" Alias "GetLogicalDrives" () As Long
  1735. Declare Function LockFile Lib "kernel32" Alias "LockFile" (ByVal hFile As Long, ByVal dwFileOffsetLow As Long, ByVal dwFileOffsetHigh As Long, ByVal nNumberOfBytesToLockLow As Long, ByVal nNumberOfBytesToLockHigh As Long) As Long
  1736. Declare Function UnlockFile Lib "kernel32" Alias "UnlockFile" (ByVal hFile As Long, ByVal dwFileOffsetLow As Long, ByVal dwFileOffsetHigh As Long, ByVal nNumberOfBytesToUnlockLow As Long, ByVal nNumberOfBytesToUnlockHigh As Long) As Long
  1737. Declare Function LockFileEx Lib "kernel32" Alias "LockFileEx" (ByVal hFile As Long, ByVal dwFlags As Long, ByVal dwReserved As Long, ByVal nNumberOfBytesToLockLow As Long, ByVal nNumberOfBytesToLockHigh As Long, lpOverlapped As OVERLAPPED) As Long
  1738.  
  1739. Const LOCKFILE_FAIL_IMMEDIATELY = &H1
  1740. Const LOCKFILE_EXCLUSIVE_LOCK = &H2
  1741.  
  1742. Declare Function UnlockFileEx Lib "kernel32" Alias "UnlockFileEx" (ByVal hFile As Long, ByVal dwReserved As Long, ByVal nNumberOfBytesToUnlockLow As Long, ByVal nNumberOfBytesToUnlockHigh As Long, lpOverlapped As OVERLAPPED) As Long
  1743.  
  1744. Type BY_HANDLE_FILE_INFORMATION
  1745.         dwFileAttributes As Long
  1746.         ftCreationTime As FILETIME
  1747.         ftLastAccessTime As FILETIME
  1748.         ftLastWriteTime As FILETIME
  1749.         dwVolumeSerialNumber As Long
  1750.         nFileSizeHigh As Long
  1751.         nFileSizeLow As Long
  1752.         nNumberOfLinks As Long
  1753.         nFileIndexHigh As Long
  1754.         nFileIndexLow As Long
  1755. End Type
  1756.  
  1757. Declare Function GetFileInformationByHandle Lib "kernel32" Alias "GetFileInformationByHandle" (ByVal hFile As Long, lpFileInformation As BY_HANDLE_FILE_INFORMATION) As Long
  1758. Declare Function GetFileType Lib "kernel32" Alias "GetFileType" (ByVal hFile As Long) As Long
  1759. Declare Function GetFileSize Lib "kernel32" Alias "GetFileSize" (ByVal hFile As Long, lpFileSizeHigh As Long) As Long
  1760. Declare Function GetStdHandle Lib "kernel32" Alias "GetStdHandle" (ByVal nStdHandle As Long) As Long
  1761. Declare Function SetStdHandle Lib "kernel32" Alias "SetStdHandle" (ByVal nStdHandle As Long, ByVal nHandle As Long) As Long
  1762. Declare Function WriteFile Lib "kernel32" Alias "WriteFile" (ByVal hFile As Long, lpBuffer As Any, ByVal nNumberOfBytesToWrite As Long, lpNumberOfBytesWritten As Long, lpOverlapped As OVERLAPPED) As Long
  1763. Declare Function ReadFile Lib "kernel32" Alias "ReadFile" (ByVal hFile As Long, lpBuffer As Any, ByVal nNumberOfBytesToRead As Long, lpNumberOfBytesRead As Long, lpOverlapped As OVERLAPPED) As Long
  1764. Declare Function FlushFileBuffers Lib "kernel32" Alias "FlushFileBuffers" (ByVal hFile As Long) As Long
  1765. Declare Function DeviceIoControl Lib "kernel32" Alias "DeviceIoControl" (ByVal hDevice As Long, ByVal dwIoControlCode As Long, lpInBuffer As Any, ByVal nInBufferSize As Long, lpOutBuffer As Any, ByVal nOutBufferSize As Long, lpBytesReturned As Long, lpOverlapped As OVERLAPPED) As Long
  1766. Declare Function SetEndOfFile Lib "kernel32" Alias "SetEndOfFile" (ByVal hFile As Long) As Long
  1767. Declare Function SetFilePointer Lib "kernel32" Alias "SetFilePointer" (ByVal hFile As Long, ByVal lDistanceToMove As Long, lpDistanceToMoveHigh As Long, ByVal dwMoveMethod As Long) As Long
  1768. Declare Function FindClose Lib "kernel32" Alias "FindClose" (ByVal hFindFile As Long) As Long
  1769. Declare Function GetFileTime Lib "kernel32" Alias "GetFileTime" (ByVal hFile As Long, lpCreationTime As FILETIME, lpLastAccessTime As FILETIME, lpLastWriteTime As FILETIME) As Long
  1770. Declare Function SetFileTime Lib "kernel32" Alias "SetFileTime" (ByVal hFile As Long, lpCreationTime As FILETIME, lpLastAccessTime As FILETIME, lpLastWriteTime As FILETIME) As Long
  1771. Declare Function CloseHandle Lib "kernel32" Alias "CloseHandle" (ByVal hObject As Long) As Long
  1772. Declare Function DuplicateHandle Lib "kernel32" Alias "DuplicateHandle" (ByVal hSourceProcessHandle As Long, ByVal hSourceHandle As Long, ByVal hTargetProcessHandle As Long, lpTargetHandle As Long, ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwOptions As Long) As Long
  1773.  
  1774. Declare Function GetDriveType Lib "kernel32" Alias "GetDriveTypeA" (ByVal nDrive As String) As Long
  1775.  
  1776. Declare Function GlobalAlloc Lib "kernel32" Alias "GlobalAlloc" (ByVal wFlags As Long, ByVal dwBytes As Long) As Long
  1777. Declare Function GlobalFree Lib "kernel32" Alias "GlobalFree" (ByVal hMem As Long) As Long
  1778. Declare Function GlobalHandle Lib "kernel32" Alias "GlobalHandle" (wMem As Any) As Long
  1779. Declare Function GlobalLock Lib "kernel32" Alias "GlobalLock" (ByVal hMem As Long) As Long
  1780. Declare Function GlobalReAlloc Lib "kernel32" Alias "GlobalReAlloc" (ByVal hMem As Long, ByVal dwBytes As Long, ByVal wFlags As Long) As Long
  1781.  
  1782. Declare Function GlobalSize Lib "kernel32" Alias "GlobalSize" (ByVal hMem As Long) As Long
  1783. Declare Function GlobalUnlock Lib "kernel32" Alias "GlobalUnlock" (ByVal hMem As Long) As Long
  1784. Declare Function GlobalFlags Lib "kernel32" Alias "GlobalFlags" (ByVal hMem As Long) As Long
  1785. Declare Sub GlobalMemoryStatus Lib "kernel32" Alias "GlobalMemoryStatus" (lpBuffer As MEMORYSTATUS)
  1786.  
  1787. Const LNOTIFY_OUTOFMEM = 0
  1788. Const LNOTIFY_MOVE = 1
  1789. Const LNOTIFY_DISCARD = 2
  1790.  
  1791. Declare Function LocalAlloc Lib "kernel32" Alias "LocalAlloc" (ByVal wFlags As Long, ByVal wBytes As Long) As Long
  1792. Declare Function LocalFree Lib "kernel32" Alias "LocalFree" (ByVal hMem As Long) As Long
  1793. Declare Function LocalHandle Lib "kernel32" Alias "LocalHandle" (wMem As Any) As Long
  1794. Declare Function LocalLock Lib "kernel32" Alias "LocalLock" (ByVal hMem As Long) As Long
  1795. Declare Function LocalReAlloc Lib "kernel32" Alias "LocalReAlloc" (ByVal hMem As Long, ByVal wBytes As Long, ByVal wFlags As Long) As Long
  1796.  
  1797. Declare Function LocalSize Lib "kernel32" Alias "LocalSize" (ByVal hMem As Long) As Long
  1798. Declare Function LocalUnlock Lib "kernel32" Alias "LocalUnlock" (ByVal hMem As Long) As Long
  1799. Declare Function LocalFlags Lib "kernel32" Alias "LocalFlags" (ByVal hMem As Long) As Long
  1800.  
  1801. Type MEMORY_BASIC_INFORMATION
  1802.      BaseAddress as Long
  1803.      AllocationBase as Long
  1804.      AllocationProtect As Long
  1805.      RegionSize As Long
  1806.      State As Long
  1807.      Protect As Long
  1808.      lType As Long
  1809. End Type
  1810.  
  1811. Declare Function FlushInstructionCache Lib "kernel32" Alias "FlushInstructionCache" (ByVal hProcess As Long, lpBaseAddress As Any, ByVal dwSize As Long) As Long
  1812. Declare Function VirtualAlloc Lib "kernel32" Alias "VirtualAlloc" (lpAddress As Any, ByVal dwSize As Long, ByVal flAllocationType As Long, ByVal flProtect As Long) As Long
  1813. Declare Function VirtualFree Lib "kernel32" Alias "VirtualFree" (lpAddress As Any, ByVal dwSize As Long, ByVal dwFreeType As Long) As Long
  1814. Declare Function VirtualProtect Lib "kernel32" Alias "VirtualProtect" (lpAddress As Any, ByVal dwSize As Long, ByVal flNewProtect As Long, lpflOldProtect As Long) As Long
  1815. Declare Function VirtualQuery Lib "kernel32" Alias "VirtualQuery" (lpAddress As Any, lpBuffer As MEMORY_BASIC_INFORMATION, ByVal dwLength As Long) As Long
  1816. Declare Function VirtualProtectEx Lib "kernel32" Alias "VirtualProtectEx" (ByVal hProcess As Long, lpAddress As Any, ByVal dwSize As Long, ByVal flNewProtect As Long, lpflOldProtect As Long) As Long
  1817. Declare Function VirtualQueryEx Lib "kernel32" Alias "VirtualQueryEx" (ByVal hProcess As Long, lpAddress As Any, lpBuffer As MEMORY_BASIC_INFORMATION, ByVal dwLength As Long) As Long
  1818. Declare Function HeapCreate Lib "kernel32" Alias "HeapCreate" (ByVal flOptions As Long, ByVal dwInitialSize As Long, ByVal dwMaximumSize As Long) As Long
  1819. Declare Function HeapDestroy Lib "kernel32" Alias "HeapDestroy" (ByVal hHeap As Long) As Long
  1820. Declare Function HeapAlloc Lib "kernel32" Alias "HeapAlloc" (ByVal hHeap As Long, ByVal dwFlags As Long, ByVal dwBytes As Long) As Long
  1821. Declare Function HeapReAlloc Lib "kernel32" Alias "HeapReAlloc" (ByVal hHeap As Long, ByVal dwFlags As Long, lpMem As Any, ByVal dwBytes As Long) As Long
  1822. Declare Function HeapFree Lib "kernel32" Alias "HeapFree" (ByVal hHeap As Long, ByVal dwFlags As Long, lpMem As Any) As Long
  1823. Declare Function HeapSize Lib "kernel32" Alias "HeapSize" (ByVal hHeap As Long, ByVal dwFlags As Long, lpMem As Any) As Long
  1824. Declare Function GetProcessHeap Lib "kernel32" Alias "GetProcessHeap" () As Long
  1825. Declare Function GetProcessTimes Lib "kernel32" Alias "GetProcessTimes" (ByVal hProcess As Long, lpCreationTime As FILETIME, lpExitTime As FILETIME, lpKernelTime As FILETIME, lpUserTime As FILETIME) As Long
  1826. Declare Function OpenProcess Lib "kernel32" Alias "OpenProcess" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
  1827. Declare Function GetCurrentProcess Lib "kernel32" Alias "GetCurrentProcess" () As Long
  1828. Declare Function GetCurrentProcessId Lib "kernel32" Alias "GetCurrentProcessId" () As Long
  1829. Declare Sub ExitProcess Lib "kernel32" Alias "ExitProcess" (ByVal uExitCode As Long)
  1830. Declare Function TerminateProcess Lib "kernel32" Alias "TerminateProcess" (ByVal hProcess As Long, ByVal uExitCode As Long) As Long
  1831. Declare Function GetExitCodeProcess Lib "kernel32" Alias "GetExitCodeProcess" (ByVal hProcess As Long, lpExitCode As Long) As Long
  1832.  
  1833. Declare Function GetLastError Lib "kernel32" Alias "GetLastError" () As Long
  1834. Declare Sub SetLastError Lib "kernel32" Alias "SetLastError" (ByVal dwErrCode As Long)
  1835.  
  1836. Const SLE_ERROR = &H1
  1837. Const SLE_MINORERROR = &H2
  1838. Const SLE_WARNING = &H3
  1839.  
  1840. Declare Sub SetLastErrorEx Lib "user32" Alias "SetLastErrorEx" (ByVal dwErrCode As Long, ByVal dwType As Long)
  1841. Declare Function GetOverlappedResult Lib "kernel32" Alias "GetOverlappedResult" (ByVal hFile As Long, lpOverlapped As OVERLAPPED, lpNumberOfBytesTransferred As Long, ByVal bWait As Long) As Long
  1842.  
  1843. Const SEM_FAILCRITICALERRORS = &H1
  1844. Const SEM_NOGPFAULTERRORBOX = &H2
  1845. Const SEM_NOOPENFILEERRORBOX = &H8000
  1846.  
  1847. Declare Sub SetDebugErrorLevel Lib "user32" Alias "SetDebugErrorLevel" (ByVal dwLevel As Long)
  1848. Declare Function SetErrorMode Lib "kernel32" Alias "SetErrorMode" (ByVal wMode As Long) As Long
  1849.  
  1850. Declare Function ReadProcessMemory Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Long, lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
  1851. Declare Function WriteProcessMemory Lib "kernel32" Alias "WriteProcessMemory" (ByVal hProcess As Long, lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
  1852. Declare Function GetThreadContext Lib "kernel32" Alias "GetThreadContext" (ByVal hThread As Long, lpContext As CONTEXT) As Long
  1853. Declare Function SetThreadContext Lib "kernel32" Alias "SetThreadContext" (ByVal hThread As Long, lpContext As CONTEXT) As Long
  1854. Declare Function SuspendThread Lib "kernel32" Alias "SuspendThread" (ByVal hThread As Long) As Long
  1855. Declare Function ResumeThread Lib "kernel32" Alias "ResumeThread" (ByVal hThread As Long) As Long
  1856.  
  1857. Declare Function FindResource Lib "kernel32" Alias "FindResourceA" (ByVal hInstance As Long, ByVal lpName As String, ByVal lpType As String) As Long
  1858. Declare Function FindResourceEx Lib "kernel32" Alias "FindResourceExA" (ByVal hModule As Long, ByVal lpType As String, ByVal lpName As String, ByVal wLanguage As Long) As Long
  1859. Declare Function BeginUpdateResource Lib "kernel32" Alias "BeginUpdateResourceA" (ByVal pFileName As String, ByVal bDeleteExistingResources As Long) As Long
  1860. Declare Function UpdateResource Lib "kernel32" Alias "UpdateResourceA" (ByVal hUpdate As Long, ByVal lpType As String, ByVal lpName As String, ByVal wLanguage As Long, lpData As Any, ByVal cbData As Long) As Long
  1861. Declare Function EndUpdateResource Lib "kernel32" Alias "EndUpdateResourceA" (ByVal hUpdate As Long, ByVal fDiscard As Long) As Long
  1862. Declare Function LoadResource Lib "kernel32" Alias "LoadResource" (ByVal hInstance As Long, ByVal hResInfo As Long) As Long
  1863. Declare Function LockResource Lib "kernel32" Alias "LockResource" (ByVal hResData As Long) As Long
  1864. Declare Function SizeofResource Lib "kernel32" Alias "SizeofResource" (ByVal hInstance As Long, ByVal hResInfo As Long) As Long
  1865.  
  1866. ' Predefined Resource Types
  1867. Const RT_CURSOR = 1&
  1868. Const RT_BITMAP = 2&
  1869. Const RT_ICON = 3&
  1870. Const RT_MENU = 4&
  1871. Const RT_DIALOG = 5&
  1872. Const RT_STRING = 6&
  1873. Const RT_FONTDIR = 7&
  1874. Const RT_FONT = 8&
  1875. Const RT_ACCELERATOR = 9&
  1876. Const RT_RCDATA = 10&
  1877.  
  1878. Declare Function InitAtomTable Lib "kernel32" Alias "InitAtomTable" (ByVal nSize As Long) As Long
  1879. Declare Function GlobalAddAtom Lib "kernel32" Alias "GlobalAddAtomA" (ByVal lpString As String) As Integer
  1880. Declare Function GlobalDeleteAtom Lib "kernel32" Alias "GlobalDeleteAtom" (ByVal nAtom As Integer) As Integer
  1881. Declare Function GlobalFindAtom Lib "kernel32" Alias "GlobalFindAtomA" (ByVal lpString As String) As Integer
  1882. Declare Function GlobalGetAtomName Lib "kernel32" Alias "GlobalGetAtomNameA" (ByVal nAtom As Integer, ByVal lpBuffer As String, ByVal nSize As Long) As Long
  1883.  
  1884. ' User Profile Routines
  1885. ' NOTE: The lpKeyName argument for GetProfileString, WriteProfileString,
  1886. '       GetPrivateProfileString, and WritePrivateProfileString can be either
  1887. '       a string or NULL.  This is why the argument is defined as "As Any".
  1888. '          For example, to pass a string specify   ByVal "wallpaper"
  1889. '          To pass NULL specify                    ByVal 0&
  1890. '       You can also pass NULL for the lpString argument for WriteProfileString
  1891. '       and WritePrivateProfileString
  1892. Declare Function GetProfileInt Lib "kernel32" Alias "GetProfileIntA" (ByVal lpAppName As String, ByVal lpKeyName As String, ByVal nDefault As Long) As Long
  1893.  
  1894. Declare Function GetProfileString Lib "kernel32" Alias "GetProfileStringA" (ByVal lpAppName As String, ByVal lpKeyName As String, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long) As Long
  1895.  
  1896. Declare Function WriteProfileString Lib "kernel32" Alias "WriteProfileStringA" (ByVal lpszSection As String, ByVal lpszKeyName As String, ByVal lpszString As String) As Long
  1897.  
  1898. Declare Function GetProfileSection Lib "kernel32" Alias "GetProfileSectionA" (ByVal lpAppName As String, ByVal lpReturnedString As String, ByVal nSize As Long) As Long
  1899. Declare Function WriteProfileSection Lib "kernel32" Alias "WriteProfileSectionA" (ByVal lpAppName As String, ByVal lpString As String) As Long
  1900. Declare Function GetPrivateProfileInt Lib "kernel32" Alias "GetPrivateProfileIntA" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal nDefault As Long, ByVal lpFileName As String) As Long
  1901.  
  1902. Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long
  1903.  
  1904. Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpString As Any, ByVal lpFileName As String) As Long
  1905.  
  1906. Declare Function GetPrivateProfileSection Lib "kernel32" Alias "GetPrivateProfileSectionA" (ByVal lpAppName As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long
  1907. Declare Function WritePrivateProfileSection Lib "kernel32" Alias "WritePrivateProfileSectionA" (ByVal lpAppName As String, ByVal lpString As String, ByVal lpFileName As String) As Long
  1908.  
  1909. Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
  1910. Declare Function GetSystemDirectory Lib "kernel32" Alias "GetSystemDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
  1911. Declare Function GetTempPath Lib "kernel32" Alias "GetTempPathA" (ByVal nBufferLength As Long, ByVal lpBuffer As String) As Long
  1912. Declare Function SetCurrentDirectory Lib "kernel32" Alias "SetCurrentDirectoryA" (ByVal lpPathName As String) As Long
  1913. Declare Function GetCurrentDirectory Lib "kernel32" Alias "GetCurrentDirectory" (ByVal nBufferLength As Long, ByVal lpBuffer As String) As Long
  1914. Declare Function GetDiskFreeSpace Lib "kernel32" Alias "GetDiskFreeSpaceA" (ByVal lpRootPathName As String, lpSectorsPerCluster As Long, lpBytesPerSector As Long, lpNumberOfFreeClusters As Long, lpTotalNumberOfClusters As Long) As Long
  1915. Declare Function CreateDirectory Lib "kernel32" Alias "CreateDirectoryA" (ByVal lpPathName As String, lpSecurityAttributes As SECURITY_ATTRIBUTES) As Long
  1916. Declare Function CreateDirectoryEx Lib "kernel32" Alias "CreateDirectoryExA" (ByVal lpTemplateDirectory As String, ByVal lpNewDirectory As String, lpSecurityAttributes As SECURITY_ATTRIBUTES) As Long
  1917. Declare Function RemoveDirectory Lib "kernel32" Alias "RemoveDirectoryA" (ByVal lpPathName As String) As Long
  1918. Declare Function GetFullPathName Lib "kernel32" Alias "GetFullPathNameA" (ByVal lpFileName As String, ByVal nBufferLength As Long, ByVal lpBuffer As String, ByVal lpFilePart As String) As Long
  1919.  
  1920. Const DDD_RAW_TARGET_PATH = &H1
  1921. Const DDD_REMOVE_DEFINITION = &H2
  1922. Const DDD_EXACT_MATCH_ON_REMOVE = &H4
  1923.  
  1924. Const MAX_PATH = 260
  1925.  
  1926. Declare Function DefineDosDevice Lib "kernel32" Alias "DefineDosDeviceA" (ByVal dwFlags As Long, ByVal lpDeviceName As String, ByVal lpTargetPath As String) As Long
  1927. Declare Function QueryDosDevice Lib "kernel32" Alias "QueryDosDeviceA" (ByVal lpDeviceName As String, ByVal lpTargetPath As String, ByVal ucchMax As Long) As Long
  1928. Declare Function CreateFile Lib "kernel32" Alias "CreateFileA" (ByVal lpFileName As String, ByVal dwDesiredAccess As Long, ByVal dwShareMode As Long, lpSecurityAttributes As SECURITY_ATTRIBUTES, ByVal dwCreationDisposition As Long, ByVal dwFlagsAndAttributes As Long, ByVal hTemplateFile As Long) As Long
  1929. Declare Function SetFileAttributes Lib "kernel32" Alias "SetFileAttributesA" (ByVal lpFileName As String, ByVal dwFileAttributes As Long) As Long
  1930. Declare Function GetFileAttributes Lib "kernel32" Alias "GetFileAttributesA" (ByVal lpFileName As String) As Long
  1931. Declare Function DeleteFile Lib "kernel32" Alias "DeleteFileA" (ByVal lpFileName As String) As Long
  1932. Declare Function FindFirstFile Lib "kernel32" Alias "FindFirstFileA" (ByVal lpFileName As String, lpFindFileData As WIN32_FIND_DATA) As Long
  1933. Declare Function FindNextFile Lib "kernel32" Alias "FindNextFileA" (ByVal hFindFile As Long, lpFindFileData As WIN32_FIND_DATA) As Long
  1934. Declare Function SearchPath Lib "kernel32" Alias "SearchPathA" (ByVal lpPath As String, ByVal lpFileName As String, ByVal lpExtension As String, ByVal nBufferLength As Long, ByVal lpBuffer As String, ByVal lpFilePart As String) As Long
  1935. Declare Function CopyFile Lib "kernel32" Alias "CopyFileA" (ByVal lpExistingFileName As String, ByVal lpNewFileName As String, ByVal bFailIfExists As Long) As Long
  1936. Declare Function MoveFile Lib "kernel32" Alias "MoveFileA" (ByVal lpExistingFileName As String, ByVal lpNewFileName As String) As Long
  1937. Declare Function MoveFileEx Lib "kernel32" Alias "MoveFileExA" (ByVal lpExistingFileName As String, ByVal lpNewFileName As String, ByVal dwFlags As Long) As Long
  1938.  
  1939. Const MOVEFILE_REPLACE_EXISTING = &H1
  1940. Const MOVEFILE_COPY_ALLOWED = &H2
  1941. Const MOVEFILE_DELAY_UNTIL_REBOOT = &H4
  1942.  
  1943. Type EVENTLOGRECORD
  1944.      Length as Long     '  Length of full record
  1945.      Reserved as Long     '  Used by the service
  1946.      RecordNumber as Long     '  Absolute record number
  1947.      TimeGenerated as Long     '  Seconds since 1-1-1970
  1948.      TimeWritten as Long     'Seconds since 1-1-1970
  1949.      EventID as Long
  1950.      EventType as Integer
  1951.      NumStrings as Integer
  1952.      EventCategory as Integer
  1953.      ReservedFlags as Integer     '  For use with paired events (auditing)
  1954.      ClosingRecordNumber as Long     'For use with paired events (auditing)
  1955.      StringOffset as Long     '  Offset from beginning of record
  1956.      UserSidLength as Long
  1957.      UserSidOffset as Long
  1958.      DataLength as Long
  1959.      DataOffset as Long     '  Offset from beginning of record
  1960. End Type
  1961.  
  1962. Declare Function CreateNamedPipe Lib "kernel32" Alias "CreateNamedPipeA" (ByVal lpName As String, ByVal dwOpenMode As Long, ByVal dwPipeMode As Long, ByVal nMaxInstances As Long, ByVal nOutBufferSize As Long, ByVal nInBufferSize As Long, ByVal nDefaultTimeOut As Long, lpSecurityAttributes As SECURITY_ATTRIBUTES) As Long
  1963. Declare Function GetNamedPipeHandleState Lib "kernel32" Alias "GetNamedPipeHandleStateA" (ByVal hNamedPipe As Long, lpState As Long, lpCurInstances As Long, lpMaxCollectionCount As Long, lpCollectDataTimeout As Long, ByVal lpUserName As String, ByVal nMaxUserNameSize As Long) As Long
  1964. Declare Function CallNamedPipe Lib "kernel32" Alias "CallNamedPipeA" (ByVal lpNamedPipeName As String, lpInBuffer As Any, ByVal nInBufferSize As Long, lpOutBuffer As Any, ByVal nOutBufferSize As Long, lpBytesRead As Long, ByVal nTimeOut As Long) As Long
  1965. Declare Function WaitNamedPipe Lib "kernel32" Alias "WaitNamedPipeA" (ByVal lpNamedPipeName As String, ByVal nTimeOut As Long) As Long
  1966. Declare Function SetVolumeLabel Lib "kernel32" Alias "SetVolumeLabelA" (ByVal lpRootPathName As String, ByVal lpVolumeName As String) As Long
  1967. Declare Sub SetFileApisToOEM Lib "kernel32" Alias "SetFileApisToOEM" ()
  1968. Declare Function GetVolumeInformation Lib "kernel32" Alias "GetVolumeInformationA" (ByVal lpRootPathName As String, ByVal lpVolumeNameBuffer As String, ByVal nVolumeNameSize As Long, lpVolumeSerialNumber As Long, lpMaximumComponentLength As Long, lpFileSystemFlags As Long, ByVal lpFileSystemNameBuffer As String, ByVal nFileSystemNameSize As Long) As Long
  1969. Declare Function ClearEventLog Lib "advapi32.dll" Alias "ClearEventLogA" (ByVal hEventLog As Long, ByVal lpBackupFileName As String) As Long
  1970. Declare Function BackupEventLog Lib "advapi32.dll" Alias "BackupEventLogA" (ByVal hEventLog As Long, ByVal lpBackupFileName As String) As Long
  1971. Declare Function CloseEventLog Lib "advapi32.dll" Alias "CloseEventLog" (ByVal hEventLog As Long) As Long
  1972. Declare Function DeregisterEventSource Lib "advapi32.dll" Alias "DeregisterEventSource" (ByVal hEventLog As Long) As Long
  1973. Declare Function GetNumberOfEventLogRecords Lib "advapi32.dll" Alias "GetNumberOfEventLogRecords" (ByVal hEventLog As Long, NumberOfRecords As Long) As Long
  1974. Declare Function GetOldestEventLogRecord Lib "advapi32.dll" Alias "GetOldestEventLogRecord" (ByVal hEventLog As Long, OldestRecord As Long) As Long
  1975. Declare Function OpenEventLog Lib "advapi32.dll" Alias "OpenEventLogA" (ByVal lpUNCServerName As String, ByVal lpSourceName As String) As Long
  1976. Declare Function RegisterEventSource Lib "advapi32.dll" Alias "RegisterEventSourceA" (ByVal lpUNCServerName As String, ByVal lpSourceName As String) As Long
  1977. Declare Function OpenBackupEventLog Lib "advapi32.dll" Alias "OpenBackupEventLogA" (ByVal lpUNCServerName As String, ByVal lpFileName As String) As Long
  1978. Declare Function ReadEventLog Lib "advapi32.dll" Alias "ReadEventLogA" (ByVal hEventLog As Long, ByVal dwReadFlags As Long, ByVal dwRecordOffset As Long, lpBuffer As EVENTLOGRECORD, ByVal nNumberOfBytesToRead As Long, pnBytesRead As Long, pnMinNumberOfBytesNeeded As Long) As Long
  1979. Declare Function ReportEvent Lib "advapi32.dll" Alias "ReportEventA" (ByVal hEventLog As Long, ByVal wType As Long, ByVal wCategory As Long, ByVal dwEventID As Long, lpUserSid As Any, ByVal wNumStrings As Long, ByVal dwDataSize As Long, ByVal lpStrings As Long, lpRawData As Any) As Long
  1980.  
  1981. ' Security APIs
  1982. Const TokenUser = 1
  1983. Const TokenGroups = 2
  1984. Const TokenPrivileges = 3
  1985. Const TokenOwner = 4
  1986. Const TokenPrimaryGroup = 5
  1987. Const TokenDefaultDacl = 6
  1988. Const TokenSource = 7
  1989. Const TokenType = 8
  1990. Const TokenImpersonationLevel = 9
  1991. Const TokenStatistics = 10
  1992.  
  1993. Type TOKEN_GROUPS
  1994.     GroupCount As Long
  1995.     Groups(ANYSIZE_ARRAY) As SID_AND_ATTRIBUTES
  1996. End Type
  1997.  
  1998. Declare Function DuplicateToken Lib "advapi32.dll" Alias "DuplicateToken" (ByVal ExistingTokenHandle As Long, ImpersonationLevel As Integer, DuplicateTokenHandle As Long) As Long
  1999. Declare Function GetKernelObjectSecurity Lib "advapi32.dll" Alias "GetKernelObjectSecurity" (ByVal Handle As Long, ByVal RequestedInformation As Long, pSecurityDescriptor As SECURITY_DESCRIPTOR, ByVal nLength As Long, lpnLengthNeeded As Long) As Long
  2000. Declare Function ImpersonateNamedPipeClient Lib "advapi32.dll" Alias "ImpersonateNamedPipeClient" (ByVal hNamedPipe As Long) As Long
  2001. Declare Function ImpersonateSelf Lib "advapi32.dll" Alias "ImpersonateSelf" (ImpersonationLevel As Integer) As Long
  2002. Declare Function RevertToSelf Lib "advapi32.dll" Alias "RevertToSelf" () As Long
  2003. Declare Function AccessCheck Lib "advapi32.dll" Alias "AccessCheck" (pSecurityDescriptor As SECURITY_DESCRIPTOR, ByVal ClientToken As Long, ByVal DesiredAccess As Long, GenericMapping As GENERIC_MAPPING, PrivilegeSet As PRIVILEGE_SET, PrivilegeSetLength As Long, GrantedAccess As Long, ByVal Status As Long) As Long
  2004.  
  2005. Type TOKEN_PRIVILEGES
  2006.     PrivilegeCount As Long
  2007.     Privileges(ANYSIZE_ARRAY) As LUID_AND_ATTRIBUTES
  2008. End Type
  2009.  
  2010. Declare Function OpenProcessToken Lib "advapi32.dll" Alias "OpenProcessToken" (ByVal ProcessHandle As Long, ByVal DesiredAccess As Long, TokenHandle As Long) As Long
  2011. Declare Function OpenThreadToken Lib "advapi32.dll" Alias "OpenThreadToken" (ByVal ThreadHandle As Long, ByVal DesiredAccess As Long, ByVal OpenAsSelf As Long, TokenHandle As Long) As Long
  2012.  
  2013. Declare Function GetTokenInformation Lib "advapi32.dll" Alias "GetTokenInformation" (ByVal TokenHandle As Long, TokenInformationClass As Integer, TokenInformation As Any, ByVal TokenInformationLength As Long, ReturnLength As Long) As Long
  2014. Declare Function SetTokenInformation Lib "advapi32.dll" Alias "SetTokenInformation" (ByVal TokenHandle As Long, TokenInformationClass As Integer, TokenInformation As Any, ByVal TokenInformationLength As Long) As Long
  2015. Declare Function AdjustTokenPrivileges Lib "advapi32.dll" Alias "AdjustTokenPrivileges" (ByVal TokenHandle As Long, ByVal DisableAllPrivileges As Long, NewState As TOKEN_PRIVILEGES, ByVal BufferLength As Long, PreviousState As TOKEN_PRIVILEGES, ReturnLength As Long) As Long
  2016. Declare Function AdjustTokenGroups Lib "advapi32.dll" Alias "AdjustTokenGroups" (ByVal TokenHandle As Long, ByVal ResetToDefault As Long, NewState As TOKEN_GROUPS, ByVal BufferLength As Long, PreviousState As TOKEN_GROUPS, ReturnLength As Long) As Long
  2017. Declare Function PrivilegeCheck Lib "advapi32.dll" Alias "PrivilegeCheck" (ByVal ClientToken As Long, RequiredPrivileges As PRIVILEGE_SET, ByVal pfResult As Long) As Long
  2018. Declare Function AccessCheckAndAuditAlarm Lib "advapi32.dll" Alias "AccessCheckAndAuditAlarmA" (ByVal SubsystemName As String, HandleId As Any, ByVal ObjectTypeName As String, ByVal ObjectName As String, SecurityDescriptor As SECURITY_DESCRIPTOR, ByVal DesiredAccess As Long, GenericMapping As GENERIC_MAPPING, ByVal ObjectCreation As Long, GrantedAccess As Long, ByVal AccessStatus As Long, ByVal pfGenerateOnClose As Long) As Long
  2019. Declare Function ObjectOpenAuditAlarm Lib "kernel32" Alias "ObjectOpenAuditAlarmA" (ByVal SubsystemName As String, HandleId As Any, ByVal ObjectTypeName As String, ByVal ObjectName As String, pSecurityDescriptor As SECURITY_DESCRIPTOR, ByVal ClientToken As Long, ByVal DesiredAccess As Long, ByVal GrantedAccess As Long, Privileges As PRIVILEGE_SET, ByVal ObjectCreation As Long, ByVal AccessGranted As Long, ByVal GenerateOnClose As Long) As Long
  2020. Declare Function ObjectPrivilegeAuditAlarm Lib "advapi32.dll" Alias "ObjectPrivilegeAuditAlarmA" (ByVal SubsystemName As String, HandleId As Any, ByVal ClientToken As Long, ByVal DesiredAccess As Long, Privileges As PRIVILEGE_SET, ByVal AccessGranted As Long) As Long
  2021. Declare Function ObjectCloseAuditAlarm Lib "advapi32.dll" Alias "ObjectCloseAuditAlarmA" (ByVal SubsystemName As String, HandleId As Any, ByVal GenerateOnClose As Long) As Long
  2022. Declare Function PrivilegedServiceAuditAlarm Lib "advapi32.dll" Alias "PrivilegedServiceAuditAlarmA" (ByVal SubsystemName As String, ByVal ServiceName As String, ByVal ClientToken As Long, Privileges As PRIVILEGE_SET, ByVal AccessGranted As Long) As Long
  2023. Declare Function IsValidSid Lib "advapi32.dll" Alias "IsValidSid" (pSid As Any) As Long
  2024. Declare Function EqualSid Lib "advapi32.dll" Alias "EqualSid" (pSid1 As Any, pSid2 As Any) As Long
  2025. Declare Function EqualPrefixSid Lib "advapi32.dll" Alias "EqualPrefixSid" (pSid1 As Any, pSid2 As Any) As Long
  2026. Declare Function GetSidLengthRequired Lib "advapi32.dll" Alias "GetSidLengthRequired" (ByVal nSubAuthorityCount As Byte) As Long
  2027. Declare Function AllocateAndInitializeSid Lib "advapi32.dll" Alias "AllocateAndInitializeSid" (pIdentifierAuthority As SID_IDENTIFIER_AUTHORITY, ByVal nSubAuthorityCount As Byte, ByVal nSubAuthority0 As Long, ByVal nSubAuthority1 As Long, ByVal nSubAuthority2 As Long, ByVal nSubAuthority3 As Long, ByVal nSubAuthority4 As Long, ByVal nSubAuthority5 As Long, ByVal nSubAuthority6 As Long, ByVal nSubAuthority7 As Long, lpPSid As Long) As Long
  2028. Declare Sub FreeSid Lib "advapi32.dll" Alias "FreeSid" (pSid As Any)
  2029. Declare Function InitializeSid Lib "advapi32.dll" Alias "InitializeSid" (Sid As Any, pIdentifierAuthority As SID_IDENTIFIER_AUTHORITY, ByVal nSubAuthorityCount As Byte) As Long
  2030. Declare Function GetSidIdentifierAuthority Lib "advapi32.dll" Alias "GetSidIdentifierAuthority" (pSid As Any) As SID_IDENTIFIER_AUTHORITY
  2031. Declare Function GetSidSubAuthority Lib "advapi32.dll" Alias "GetSidSubAuthority" (pSid As Any, ByVal nSubAuthority As Long) As Long
  2032. Declare Function GetSidSubAuthorityCount Lib "advapi32.dll" Alias "GetSidSubAuthorityCount" (pSid As Any) As Byte
  2033. Declare Function GetLengthSid Lib "advapi32.dll" Alias "GetLengthSid" (pSid As Any) As Long
  2034. Declare Function CopySid Lib "advapi32.dll" Alias "CopySid" (ByVal nDestinationSidLength As Long, pDestinationSid As Any, pSourceSid As Any) As Long
  2035. Declare Function AreAllAccessesGranted Lib "advapi32.dll" Alias "AreAllAccessesGranted" (ByVal GrantedAccess As Long, ByVal DesiredAccess As Long) As Long
  2036. Declare Function AreAnyAccessesGranted Lib "advapi32.dll" Alias "AreAnyAccessesGranted" (ByVal GrantedAccess As Long, ByVal DesiredAccess As Long) As Long
  2037. Declare Sub MapGenericMask Lib "advapi32.dll" Alias "MapGenericMask" (AccessMask As Long, GenericMapping As GENERIC_MAPPING)
  2038. Declare Function IsValidAcl Lib "advapi32.dll" Alias "IsValidAcl" (pAcl As ACL) As Long
  2039. Declare Function InitializeAcl Lib "advapi32.dll" Alias "InitializeAcl" (pAcl As ACL, ByVal nAclLength As Long, ByVal dwAclRevision As Long) As Long
  2040. Declare Function GetAclInformation Lib "advapi32.dll" Alias "GetAclInformation" (pAcl As ACL, pAclInformation As Any, ByVal nAclInformationLength As Long, ByVal dwAclInformationClass As Integer) As Long
  2041. Declare Function SetAclInformation Lib "advapi32.dll" Alias "SetAclInformation" (pAcl As ACL, pAclInformation As Any, ByVal nAclInformationLength As Long, ByVal dwAclInformationClass As Integer) As Long
  2042. Declare Function AddAce Lib "advapi32.dll" Alias "AddAce" (pAcl As ACL, ByVal dwAceRevision As Long, ByVal dwStartingAceIndex As Long, pAceList As Any, ByVal nAceListLength As Long) As Long
  2043. Declare Function DeleteAce Lib "advapi32.dll" Alias "DeleteAce" (pAcl As ACL, ByVal dwAceIndex As Long) As Long
  2044. Declare Function GetAce Lib "advapi32.dll" Alias "GetAce" (pAcl As ACL, ByVal dwAceIndex As Long, pAce As Any) As Long
  2045. Declare Function AddAccessAllowedAce Lib "advapi32.dll" Alias "AddAccessAllowedAce" (pAcl As ACL, ByVal dwAceRevision As Long, ByVal AccessMask As Long, pSid As Any) As Long
  2046. Declare Function AddAccessDeniedAce Lib "advapi32.dll" Alias "AddAccessDeniedAce" (pAcl As ACL, ByVal dwAceRevision As Long, ByVal AccessMask As Long, pSid As Any) As Long
  2047. Declare Function AddAuditAccessAce Lib "advapi32.dll" Alias "AddAuditAccessAce" (pAcl As ACL, ByVal dwAceRevision As Long, ByVal dwAccessMask As Long, pSid As Any, ByVal bAuditSuccess As Long, ByVal bAuditFailure As Long) As Long
  2048. Declare Function FindFirstFreeAce Lib "advapi32.dll" Alias "FindFirstFreeAce" (pAcl As ACL, pAce As Long) As Long
  2049. Declare Function InitializeSecurityDescriptor Lib "advapi32.dll" Alias "InitializeSecurityDescriptor" (pSecurityDescriptor As SECURITY_DESCRIPTOR, ByVal dwRevision As Long) As Long
  2050. Declare Function IsValidSecurityDescriptor Lib "advapi32.dll" Alias "IsValidSecurityDescriptor" (pSecurityDescriptor As SECURITY_DESCRIPTOR) As Long
  2051. Declare Function GetSecurityDescriptorLength Lib "advapi32.dll" Alias "GetSecurityDescriptorLength" (pSecurityDescriptor As SECURITY_DESCRIPTOR) As Long
  2052.  
  2053. Declare Function GetSecurityDescriptorControl Lib "advapi32.dll" Alias "GetSecurityDescriptorControl" (pSecurityDescriptor As SECURITY_DESCRIPTOR, pControl As Integer, lpdwRevision As Long) As Long
  2054. Declare Function SetSecurityDescriptorDacl Lib "advapi32.dll" Alias "SetSecurityDescriptorDacl" (pSecurityDescriptor As SECURITY_DESCRIPTOR, ByVal bDaclPresent As Long, pDacl As ACL, ByVal bDaclDefaulted As Long) As Long
  2055. Declare Function GetSecurityDescriptorDacl Lib "advapi32.dll" Alias "GetSecurityDescriptorDacl" (pSecurityDescriptor As SECURITY_DESCRIPTOR, lpbDaclPresent As Long, pDacl As ACL, lpbDaclDefaulted As Long) As Long
  2056. Declare Function SetSecurityDescriptorSacl Lib "advapi32.dll" Alias "SetSecurityDescriptorSacl" (pSecurityDescriptor As SECURITY_DESCRIPTOR, ByVal bSaclPresent As Long, pSacl As ACL, ByVal bSaclDefaulted As Long) As Long
  2057. Declare Function GetSecurityDescriptorSacl Lib "advapi32.dll" Alias "GetSecurityDescriptorSacl" (pSecurityDescriptor As SECURITY_DESCRIPTOR, ByVal lpbSaclPresent As Long, pSacl As ACL, ByVal lpbSaclDefaulted As Long) As Long
  2058. Declare Function SetSecurityDescriptorOwner Lib "advapi32.dll" Alias "SetSecurityDescriptorOwner" (pSecurityDescriptor As SECURITY_DESCRIPTOR, pOwner As Any, ByVal bOwnerDefaulted As Long) As Long
  2059. Declare Function GetSecurityDescriptorOwner Lib "advapi32.dll" Alias "GetSecurityDescriptorOwner" (pSecurityDescriptor As SECURITY_DESCRIPTOR, pOwner As Any, ByVal lpbOwnerDefaulted As Long) As Long
  2060. Declare Function SetSecurityDescriptorGroup Lib "advapi32.dll" Alias "SetSecurityDescriptorGroup" (pSecurityDescriptor As SECURITY_DESCRIPTOR, pGroup As Any, ByVal bGroupDefaulted As Long) As Long
  2061. Declare Function GetSecurityDescriptorGroup Lib "advapi32.dll" Alias "GetSecurityDescriptorGroup" (pSecurityDescriptor As SECURITY_DESCRIPTOR, pGroup As Any, ByVal lpbGroupDefaulted As Long) As Long
  2062. Declare Function CreatePrivateObjectSecurity Lib "advapi32.dll" Alias "CreatePrivateObjectSecurity" (ParentDescriptor As SECURITY_DESCRIPTOR, CreatorDescriptor As SECURITY_DESCRIPTOR, NewDescriptor As SECURITY_DESCRIPTOR, ByVal IsDirectoryObject As Long, ByVal Token As Long, GenericMapping As GENERIC_MAPPING) As Long
  2063. Declare Function SetPrivateObjectSecurity Lib "advapi32.dll" Alias "SetPrivateObjectSecurity" (ByVal SecurityInformation As Long, ModificationDescriptor As SECURITY_DESCRIPTOR, ObjectsSecurityDescriptor As SECURITY_DESCRIPTOR, GenericMapping As GENERIC_MAPPING, ByVal Token As Long) As Long
  2064. Declare Function GetPrivateObjectSecurity Lib "advapi32.dll" Alias "GetPrivateObjectSecurity" (ObjectDescriptor As SECURITY_DESCRIPTOR, ByVal SecurityInformation As Long, ResultantDescriptor As SECURITY_DESCRIPTOR, ByVal DescriptorLength As Long, ReturnLength As Long) As Long
  2065. Declare Function DestroyPrivateObjectSecurity Lib "advapi32.dll" Alias "DestroyPrivateObjectSecurity" (ObjectDescriptor As SECURITY_DESCRIPTOR) As Long
  2066. Declare Function MakeSelfRelativeSD Lib "advapi32.dll" Alias "MakeSelfRelativeSD" (pAbsoluteSecurityDescriptor As SECURITY_DESCRIPTOR, pSelfRelativeSecurityDescriptor As SECURITY_DESCRIPTOR, lpdwBufferLength As Long) As Long
  2067. Declare Function MakeAbsoluteSD Lib "advapi32.dll" Alias "MakeAbsoluteSD" (pSelfRelativeSecurityDescriptor As SECURITY_DESCRIPTOR, pAbsoluteSecurityDescriptor As SECURITY_DESCRIPTOR, lpdwAbsoluteSecurityDescriptorSize As Long, pDacl As ACL, lpdwDaclSize As Long, pSacl As ACL, lpdwSaclSize As Long, pOwner As Any, lpdwOwnerSize As Long, pPrimaryGroup As Any, lpdwPrimaryGroupSize As Long) As Long
  2068. Declare Function SetFileSecurity Lib "advapi32.dll" Alias "SetFileSecurityA" (ByVal lpFileName As String, ByVal SecurityInformation As Long, pSecurityDescriptor As SECURITY_DESCRIPTOR) As Long
  2069. Declare Function GetFileSecurity Lib "advapi32.dll" Alias "GetFileSecurityA" (ByVal lpFileName As String, ByVal RequestedInformation As Long, pSecurityDescriptor As SECURITY_DESCRIPTOR, ByVal nLength As Long, lpnLengthNeeded As Long) As Long
  2070. Declare Function SetKernelObjectSecurity Lib "advapi32.dll" Alias "SetKernelObjectSecurity" (ByVal Handle As Long, ByVal SecurityInformation As Long, SecurityDescriptor As SECURITY_DESCRIPTOR) As Long
  2071. Declare Function FindFirstChangeNotification Lib "kernel32" Alias "FindFirstChangeNotificationA" (ByVal lpPathName As String, ByVal bWatchSubtree As Long, ByVal dwNotifyFilter As Long) As Long
  2072. Declare Function FindNextChangeNotification Lib "kernel32" Alias "FindNextChangeNotification" (ByVal hChangeHandle As Long) As Long
  2073. Declare Function FindCloseChangeNotification Lib "kernel32" Alias "FindCloseChangeNotification" (ByVal hChangeHandle As Long) As Long
  2074. Declare Function VirtualLock Lib "kernel32" Alias "VirtualLock" (lpAddress As Any, ByVal dwSize As Long) As Long
  2075. Declare Function VirtualUnlock Lib "kernel32" Alias "VirtualUnlock" (lpAddress As Any, ByVal dwSize As Long) As Long
  2076. Declare Function MapViewOfFileEx Lib "kernel32" Alias "MapViewOfFileEx" (ByVal hFileMappingObject As Long, ByVal dwDesiredAccess As Long, ByVal dwFileOffsetHigh As Long, ByVal dwFileOffsetLow As Long, ByVal dwNumberOfBytesToMap As Long, lpBaseAddress As Any) As Long
  2077. Declare Function SetPriorityClass Lib "kernel32" Alias "SetPriorityClass" (ByVal hProcess As Long, ByVal dwPriorityClass As Long) As Long
  2078. Declare Function GetPriorityClass Lib "kernel32" Alias "GetPriorityClass" (ByVal hProcess As Long) As Long
  2079.  
  2080. Type CONTEXT
  2081.     FltF0 As Double
  2082.     FltF1 As Double
  2083.     FltF2 As Double
  2084.     FltF3 As Double
  2085.     FltF4 As Double
  2086.     FltF5 As Double
  2087.     FltF6 As Double
  2088.     FltF7 As Double
  2089.     FltF8 As Double
  2090.     FltF9 As Double
  2091.     FltF10 As Double
  2092.     FltF11 As Double
  2093.     FltF12 As Double
  2094.     FltF13 As Double
  2095.     FltF14 As Double
  2096.     FltF15 As Double
  2097.     FltF16 As Double
  2098.     FltF17 As Double
  2099.     FltF18 As Double
  2100.     FltF19 As Double
  2101.     FltF20 As Double
  2102.     FltF21 As Double
  2103.     FltF22 As Double
  2104.     FltF23 As Double
  2105.     FltF24 As Double
  2106.     FltF25 As Double
  2107.     FltF26 As Double
  2108.     FltF27 As Double
  2109.     FltF28 As Double
  2110.     FltF29 As Double
  2111.     FltF30 As Double
  2112.     FltF31 As Double
  2113.  
  2114.     IntV0 As Double
  2115.     IntT0 As Double
  2116.     IntT1 As Double
  2117.     IntT2 As Double
  2118.     IntT3 As Double
  2119.     IntT4 As Double
  2120.     IntT5 As Double
  2121.     IntT6 As Double
  2122.     IntT7 As Double
  2123.     IntS0 As Double
  2124.     IntS1 As Double
  2125.     IntS2 As Double
  2126.     IntS3 As Double
  2127.     IntS4 As Double
  2128.     IntS5 As Double
  2129.     IntFp As Double
  2130.     IntA0 As Double
  2131.     IntA1 As Double
  2132.     IntA2 As Double
  2133.     IntA3 As Double
  2134.     IntA4 As Double
  2135.     IntA5 As Double
  2136.     IntT8 As Double
  2137.     IntT9 As Double
  2138.     IntT10 As Double
  2139.     IntT11 As Double
  2140.     IntRa As Double
  2141.     IntT12 As Double
  2142.     IntAt As Double
  2143.     IntGp As Double
  2144.     IntSp As Double
  2145.     IntZero As Double
  2146.  
  2147.     Fpcr As Double
  2148.     SoftFpcr As Double
  2149.  
  2150.     Fir As Double
  2151.     Psr As Long
  2152.  
  2153.     ContextFlags As Long
  2154.     Fill(4) As Long
  2155. End Type
  2156.  
  2157. Type EXCEPTION_POINTERS
  2158.     pExceptionRecord As EXCEPTION_RECORD
  2159.     ContextRecord As CONTEXT
  2160. End Type
  2161.  
  2162. Type LDT_BYTES    ' Defined for use in LDT_ENTRY Type
  2163.     BaseMid As Byte
  2164.     Flags1 As Byte
  2165.     Flags2 As Byte
  2166.     BaseHi As Byte
  2167. End Type
  2168.  
  2169. Type LDT_ENTRY
  2170.     LimitLow As Integer
  2171.     BaseLow As Integer
  2172.     HighWord As Long    ' Can use LDT_BYTES Type
  2173. End Type
  2174.  
  2175. Declare Sub FatalExit Lib "kernel32" Alias "FatalExit" (ByVal code As Long)
  2176. Declare Function GetEnvironmentStrings Lib "kernel32" Alias "GetEnvironmentStringsA" () As String
  2177. Declare Sub RaiseException Lib "kernel32" Alias "RaiseException" (ByVal dwExceptionCode As Long, ByVal dwExceptionFlags As Long, ByVal nNumberOfArguments As Long, lpArguments As Long)
  2178. Declare Function UnhandledExceptionFilter Lib "kernel32" Alias "UnhandledExceptionFilter" (ExceptionInfo As EXCEPTION_POINTERS) As Long
  2179.  
  2180. Declare Function CreateThread Lib "kernel32" Alias "CreateThread" (lpThreadAttributes As SECURITY_ATTRIBUTES, ByVal dwStackSize As Long, lpStartAddress As Long, lpParameter As Any, ByVal dwCreationFlags As Long, lpThreadId As Long) As Long
  2181. Declare Function CreateRemoteThread Lib "kernel32" Alias "CreateRemoteThread" (ByVal hProcess As Long, lpThreadAttributes As SECURITY_ATTRIBUTES, ByVal dwStackSize As Long, lpStartAddress As Long, lpParameter As Any, ByVal dwCreationFlags As Long, lpThreadId As Long) As Long
  2182. Declare Function GetCurrentThread Lib "kernel32" Alias "GetCurrentThread" () As Long
  2183. Declare Function GetCurrentThreadId Lib "kernel32" Alias "GetCurrentThreadId" () As Long
  2184. Declare Function SetThreadPriority Lib "kernel32" Alias "SetThreadPriority" (ByVal hThread As Long, ByVal nPriority As Long) As Long
  2185. Declare Function GetThreadPriority Lib "kernel32" Alias "GetThreadPriority" (ByVal hThread As Long) As Long
  2186. Declare Function GetThreadTimes Lib "kernel32" Alias "GetThreadTimes" (ByVal hThread As Long, lpCreationTime As FILETIME, lpExitTime As FILETIME, lpKernelTime As FILETIME, lpUserTime As FILETIME) As Long
  2187. Declare Sub ExitThread Lib "kernel32" Alias "ExitThread" (ByVal dwExitCode As Long)
  2188. Declare Function TerminateThread Lib "kernel32" Alias "TerminateThread" (ByVal hThread As Long, ByVal dwExitCode As Long) As Long
  2189. Declare Function GetExitCodeThread Lib "kernel32" Alias "GetExitCodeThread" (ByVal hThread As Long, lpExitCode As Long) As Long
  2190. Declare Function GetThreadSelectorEntry Lib "kernel32" Alias "GetThreadSelectorEntry" (ByVal hThread As Long, ByVal dwSelector As Long, lpSelectorEntry As LDT_ENTRY) As Long
  2191.  
  2192. ' COMM declarations
  2193. Declare Function SetCommState Lib "kernel32" Alias "SetCommState" (ByVal hCommDev As Long, lpDCB As DCB) As Long
  2194. Declare Function SetCommTimeouts Lib "kernel32" Alias "SetCommTimeouts" (ByVal hFile As Long, lpCommTimeouts As COMMTIMEOUTS) As Long
  2195. Declare Function GetCommState Lib "kernel32" Alias "GetCommState" (ByVal nCid As Long, lpDCB As DCB) As Long
  2196. Declare Function GetCommTimeouts Lib "kernel32" Alias "GetCommTimeouts" (ByVal hFile As Long, lpCommTimeouts As COMMTIMEOUTS) As Long
  2197. Declare Function PurgeComm Lib "kernel32" Alias "PurgeComm" (ByVal hFile As Long, ByVal dwFlags As Long) As Long
  2198. Declare Function BuildCommDCB Lib "kernel32" Alias "BuildCommDCBA" (ByVal lpDef As String, lpDCB As DCB) As Long
  2199. Declare Function BuildCommDCBAndTimeouts Lib "kernel32" Alias "BuildCommDCBAndTimeoutsA" (ByVal lpDef As String, lpDCB As DCB, lpCommTimeouts As COMMTIMEOUTS) As Long
  2200. Declare Function TransmitCommChar Lib "kernel32" Alias "TransmitCommChar" (ByVal nCid As Long, ByVal cChar As Byte) As Long
  2201. Declare Function SetCommBreak Lib "kernel32" Alias "SetCommBreak" (ByVal nCid As Long) As Long
  2202. Declare Function SetCommMask Lib "kernel32" Alias "SetCommMask" (ByVal hFile As Long, ByVal dwEvtMask As Long) As Long
  2203. Declare Function ClearCommBreak Lib "kernel32" Alias "ClearCommBreak" (ByVal nCid As Long) As Long
  2204. Declare Function ClearCommError Lib "kernel32" Alias "ClearCommError" (ByVal hFile As Long, lpErrors As Long, lpStat As COMSTAT) As Long
  2205. Declare Function SetupComm Lib "kernel32" Alias "SetupComm" (ByVal hFile As Long, ByVal dwInQueue As Long, ByVal dwOutQueue As Long) As Long
  2206. Declare Function EscapeCommFunction Lib "kernel32" Alias "EscapeCommFunction" (ByVal nCid As Long, ByVal nFunc As Long) As Long
  2207. Declare Function GetCommMask Lib "kernel32" Alias "GetCommMask" (ByVal hFile As Long, lpEvtMask As Long) As Long
  2208. Declare Function GetCommProperties Lib "kernel32" Alias "GetCommProperties" (ByVal hFile As Long, lpCommProp As COMMPROP) As Long
  2209. Declare Function GetCommModemStatus Lib "kernel32" Alias "GetCommModemStatus" (ByVal hFile As Long, lpModemStat As Long) As Long
  2210. Declare Function WaitCommEvent Lib "kernel32" Alias "WaitCommEvent" (ByVal hFile As Long, lpEvtMask As Long, lpOverlapped As OVERLAPPED) As Long
  2211.  
  2212. Declare Function SetTapePosition Lib "kernel32" Alias "SetTapePosition" (ByVal hDevice As Long, ByVal dwPositionMethod As Long, ByVal dwPartition As Long, ByVal dwOffsetLow As Long, ByVal dwOffsetHigh As Long, ByVal bimmediate As Long) As Long
  2213. Declare Function GetTapePosition Lib "kernel32" Alias "GetTapePosition" (ByVal hDevice As Long, ByVal dwPositionType As Long, lpdwPartition As Long, lpdwOffsetLow As Long, lpdwOffsetHigh As Long) As Long
  2214. Declare Function PrepareTape Lib "kernel32" Alias "PrepareTape" (ByVal hDevice As Long, ByVal dwOperation As Long, ByVal bimmediate As Long) As Long
  2215. Declare Function EraseTape Lib "kernel32" Alias "EraseTape" (ByVal hDevice As Long, ByVal dwEraseType As Long, ByVal bimmediate As Long) As Long
  2216. Declare Function CreateTapePartition Lib "kernel32" Alias "CreateTapePartition" (ByVal hDevice As Long, ByVal dwPartitionMethod As Long, ByVal dwCount As Long, ByVal dwSize As Long) As Long
  2217. Declare Function WriteTapemark Lib "kernel32" Alias "WriteTapemark" (ByVal hDevice As Long, ByVal dwTapemarkType As Long, ByVal dwTapemarkCount As Long, ByVal bimmediate As Long) As Long
  2218. Declare Function GetTapeStatus Lib "kernel32" Alias "GetTapeStatus" (ByVal hDevice As Long) As Long
  2219. Declare Function GetTapeParameters Lib "kernel32" Alias "GetTapeParameters" (ByVal hDevice As Long, ByVal dwOperation As Long, lpdwSize As Long, lpTapeInformation As Any) As Long
  2220.  
  2221. Const GET_TAPE_MEDIA_INFORMATION = 0
  2222. Const GET_TAPE_DRIVE_INFORMATION = 1
  2223.  
  2224. Declare Function SetTapeParameters Lib "kernel32" Alias "SetTapeParameters" (ByVal hDevice As Long, ByVal dwOperation As Long, lpTapeInformation As Any) As Long
  2225.  
  2226. Const SET_TAPE_MEDIA_INFORMATION = 0
  2227. Const SET_TAPE_DRIVE_INFORMATION = 1
  2228.  
  2229. Declare Function Beep Lib "kernel32" Alias "Beep" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long
  2230.  
  2231. Declare Function MulDiv Lib "kernel32" Alias "MulDiv" (ByVal nNumber As Long, ByVal nNumerator As Long, ByVal nDenominator As Long) As Long
  2232.  
  2233. Declare Sub GetSystemTime Lib "kernel32" Alias "GetSystemTime" (lpSystemTime As SYSTEMTIME)
  2234. Declare Function SetSystemTime Lib "kernel32" Alias "SetSystemTime" (lpSystemTime As SYSTEMTIME) As Long
  2235. Declare Sub GetLocalTime Lib "kernel32" Alias "GetLocalTime" (lpSystemTime As SYSTEMTIME)
  2236. Declare Function SetLocalTime Lib "kernel32" Alias "SetLocalTime" (lpSystemTime As SYSTEMTIME) As Long
  2237. Declare Sub GetSystemInfo Lib "kernel32" Alias "GetSystemInfo" (lpSystemInfo As SYSTEM_INFO)
  2238.  
  2239. Type TIME_ZONE_INFORMATION
  2240.         Bias As Long
  2241.         StandardName(32) As Integer
  2242.         StandardDate As SYSTEMTIME
  2243.         StandardBias As Long
  2244.         DaylightName(32) As Integer
  2245.         DaylightDate As SYSTEMTIME
  2246.         DaylightBias As Long
  2247. End Type
  2248.  
  2249. Declare Function GetTimeZoneInformation Lib "kernel32" Alias "GetTimeZoneInformation" (lpTimeZoneInformation As TIME_ZONE_INFORMATION) As Long
  2250. Declare Function SetTimeZoneInformation Lib "kernel32" Alias "SetTimeZoneInformation" (lpTimeZoneInformation As TIME_ZONE_INFORMATION) As Long
  2251.  
  2252. ' Routines to convert back and forth
  2253. ' between system time and file time
  2254.  
  2255. Declare Function SystemTimeToFileTime Lib "kernel32" Alias "SystemTimeToFileTime" (lpSystemTime As SYSTEMTIME, lpFileTime As FILETIME) As Long
  2256. Declare Function FileTimeToLocalFileTime Lib "kernel32" Alias "FileTimeToLocalFileTime" (lpFileTime As FILETIME, lpLocalFileTime As FILETIME) As Long
  2257. Declare Function LocalFileTimeToFileTime Lib "kernel32" Alias "LocalFileTimeToFileTime" (lpLocalFileTime As FILETIME, lpFileTime As FILETIME) As Long
  2258. Declare Function FileTimeToSystemTime Lib "kernel32" Alias "FileTimeToSystemTime" (lpFileTime As FILETIME, lpSystemTime As SYSTEMTIME) As Long
  2259. Declare Function CompareFileTime Lib "kernel32" Alias "CompareFileTime" (lpFileTime1 As FILETIME, lpFileTime2 As FILETIME) As Long
  2260. Declare Function FileTimeToDosDateTime Lib "kernel32" Alias "FileTimeToDosDateTime" (lpFileTime As FILETIME, ByVal lpFatDate As Long, ByVal lpFatTime As Long) As Long
  2261. Declare Function DosDateTimeToFileTime Lib "kernel32" Alias "DosDateTimeToFileTime" (ByVal wFatDate As Long, ByVal wFatTime As Long, lpFileTime As FILETIME) As Long
  2262. Declare Function GetTickCount Lib "kernel32" Alias "GetTickCount" () As Long
  2263. Declare Function FormatMessage Lib "kernel32" Alias "FormatMessageA" (ByVal dwFlags As Long, lpSource As Any, ByVal dwMessageId As Long, ByVal dwLanguageId As Long, ByVal lpBuffer As String, ByVal nSize As Long, Arguments As Long) As Long
  2264.  
  2265. Const FORMAT_MESSAGE_ALLOCATE_BUFFER = &H100
  2266. Const FORMAT_MESSAGE_IGNORE_INSERTS = &H200
  2267. Const FORMAT_MESSAGE_FROM_STRING = &H400
  2268. Const FORMAT_MESSAGE_FROM_HMODULE = &H800
  2269. Const FORMAT_MESSAGE_FROM_SYSTEM = &H1000
  2270. Const FORMAT_MESSAGE_ARGUMENT_ARRAY = &H2000
  2271. Const FORMAT_MESSAGE_MAX_WIDTH_MASK = &HFF
  2272.  
  2273. Declare Function CreatePipe Lib "kernel32" Alias "CreatePipe" (phReadPipe As Long, phWritePipe As Long, lpPipeAttributes As SECURITY_ATTRIBUTES, ByVal nSize As Long) As Long
  2274. Declare Function ConnectNamedPipe Lib "kernel32" Alias "ConnectNamedPipe" (ByVal hNamedPipe As Long, lpOverlapped As OVERLAPPED) As Long
  2275. Declare Function DisconnectNamedPipe Lib "kernel32" Alias "DisconnectNamedPipe" (ByVal hNamedPipe As Long) As Long
  2276. Declare Function SetNamedPipeHandleState Lib "kernel32" Alias "SetNamedPipeHandleState" (ByVal hNamedPipe As Long, lpMode As Long, lpMaxCollectionCount As Long, lpCollectDataTimeout As Long) As Long
  2277. Declare Function GetNamedPipeInfo Lib "kernel32" Alias "GetNamedPipeInfo" (ByVal hNamedPipe As Long, lpFlags As Long, lpOutBufferSize As Long, lpInBufferSize As Long, lpMaxInstances As Long) As Long
  2278. Declare Function PeekNamedPipe Lib "kernel32" Alias "PeekNamedPipe" (ByVal hNamedPipe As Long, lpBuffer As Any, ByVal nBufferSize As Long, lpBytesRead As Long, lpTotalBytesAvail As Long, lpBytesLeftThisMessage As Long) As Long
  2279. Declare Function TransactNamedPipe Lib "kernel32" Alias "TransactNamedPipe" (ByVal hNamedPipe As Long, lpInBuffer As Any, ByVal nInBufferSize As Long, lpOutBuffer As Any, ByVal nOutBufferSize As Long, lpBytesRead As Long, lpOverlapped As OVERLAPPED) As Long
  2280.  
  2281. Declare Function CreateMailslot Lib "kernel32" Alias "CreateMailslotA" (ByVal lpName As String, ByVal nMaxMessageSize As Long, ByVal lReadTimeout As Long, lpSecurityAttributes As SECURITY_ATTRIBUTES) As Long
  2282. Declare Function GetMailslotInfo Lib "kernel32" Alias "GetMailslotInfo" (ByVal hMailslot As Long, lpMaxMessageSize As Long, lpNextSize As Long, lpMessageCount As Long, lpReadTimeout As Long) As Long
  2283. Declare Function SetMailslotInfo Lib "kernel32" Alias "SetMailslotInfo" (ByVal hMailslot As Long, ByVal lReadTimeout As Long) As Long
  2284. Declare Function MapViewOfFile Lib "kernel32" Alias "MapViewOfFile" (ByVal hFileMappingObject As Long, ByVal dwDesiredAccess As Long, ByVal dwFileOffsetHigh As Long, ByVal dwFileOffsetLow As Long, ByVal dwNumberOfBytesToMap As Long) As Long
  2285.  
  2286. Declare Function FlushViewOfFile Lib "kernel32" Alias "FlushViewOfFile" (lpBaseAddress As Any, ByVal dwNumberOfBytesToFlush As Long) As Long
  2287. Declare Function UnmapViewOfFile Lib "kernel32" Alias "UnmapViewOfFile" (lpBaseAddress As Any) As Long
  2288.  
  2289. Declare Function lstrcmp Lib "kernel32" Alias "lstrcmpA" (ByVal lpString1 As String, ByVal lpString2 As String) As Long
  2290. Declare Function lstrcmpi Lib "kernel32" Alias "lstrcmpiA" (ByVal lpString1 As String, ByVal lpString2 As String) As Long
  2291. Declare Function lstrlen Lib "kernel32" Alias "lstrlenA" (ByVal lpString As String) As Long
  2292.  
  2293. Declare Function lopen Lib "kernel32" Alias "_lopen" (ByVal lpPathName As String, ByVal iReadWrite As Long) As Long
  2294. Declare Function lclose Lib "kernel32" Alias "_lclose" (ByVal hFile As Long) As Long
  2295. Declare Function lcreat Lib "kernel32" Alias "_lcreat" (ByVal lpPathName As String, ByVal iAttribute As Long) As Long
  2296. Declare Function llseek Lib "kernel32" Alias "_llseek" (ByVal hFile As Long, ByVal lOffset As Long, ByVal iOrigin As Long) As Long
  2297. Declare Function lread Lib "kernel32" Alias "_lread" (ByVal hFile As Long, lpBuffer As Any, ByVal wBytes As Long) As Long
  2298. Declare Function lwrite Lib "kernel32" Alias "_lwrite" (ByVal hFile As Long, ByVal lpBuffer As String, ByVal wBytes As Long) As Long
  2299.  
  2300. Declare Function hread Lib "kernel32" Alias "_hread" (ByVal hFile As Long, lpBuffer As Any, ByVal lBytes As Long) As Long
  2301. Declare Function hwrite Lib "kernel32" Alias "_hwrite" (ByVal hFile As Long, ByVal lpBuffer As String, ByVal lBytes As Long) As Long
  2302.  
  2303. Declare Function TlsAlloc Lib "kernel32" Alias "TlsAlloc" () As Long
  2304.  
  2305. Const TLS_OUT_OF_INDEXES = &HFFFF
  2306.  
  2307. Declare Function TlsGetValue Lib "kernel32" Alias "TlsGetValue" (ByVal dwTlsIndex As Long) As Long
  2308. Declare Function TlsSetValue Lib "kernel32" Alias "TlsSetValue" (ByVal dwTlsIndex As Long, lpTlsValue As Any) As Long
  2309. Declare Function TlsFree Lib "kernel32" Alias "TlsFree" (ByVal dwTlsIndex As Long) As Long
  2310. Declare Function SleepEx Lib "kernel32" Alias "SleepEx" (ByVal dwMilliseconds As Long, ByVal bAlertable As Long) As Long
  2311. Declare Function WaitForSingleObjectEx Lib "kernel32" Alias "WaitForSingleObjectEx" (ByVal hHandle As Long, ByVal dwMilliseconds As Long, ByVal bAlertable As Long) As Long
  2312. Declare Function WaitForMultipleObjectsEx Lib "kernel32" Alias "WaitForMultipleObjectsEx" (ByVal nCount As Long, lpHandles As Long, ByVal bWaitAll As Long, ByVal dwMilliseconds As Long, ByVal bAlertable As Long) As Long
  2313. Declare Function BackupRead Lib "kernel32" Alias "BackupRead" (ByVal hFile As Long, lpBuffer As Byte, ByVal nNumberOfBytesToRead As Long, lpNumberOfBytesRead As Long, ByVal bAbort As Long, ByVal bProcessSecurity As Long, lpContext As Any) As Long
  2314. Declare Function BackupSeek Lib "kernel32" Alias "BackupSeek" (ByVal hFile As Long, ByVal dwLowBytesToSeek As Long, ByVal dwHighBytesToSeek As Long, lpdwLowByteSeeked As Long, lpdwHighByteSeeked As Long, lpContext As Long) As Long
  2315. Declare Function BackupWrite Lib "kernel32" Alias "BackupWrite" (ByVal hFile As Long, lpBuffer As Byte, ByVal nNumberOfBytesToWrite As Long, lpNumberOfBytesWritten As Long, ByVal bAbort As Long, ByVal bProcessSecurity As Long, lpContext As Long) As Long
  2316.  
  2317. ' Stream ID type
  2318. Type WIN32_STREAM_ID
  2319.         dwStreamID As Long
  2320.         dwStreamAttributes As Long
  2321.         dwStreamSizeLow As Long
  2322.         dwStreamSizeHigh As Long
  2323.         dwStreamNameSize As Long
  2324.         cStreamName As Byte
  2325. End Type
  2326.  
  2327. ' Stream IDs
  2328. Const BACKUP_DATA = &H1
  2329. Const BACKUP_EA_DATA = &H2
  2330. Const BACKUP_SECURITY_DATA = &H3
  2331. Const BACKUP_ALTERNATE_DATA = &H4
  2332. Const BACKUP_LINK = &H5
  2333.  
  2334. '   Stream Attributes
  2335. Const STREAM_MODIFIED_WHEN_READ = &H1
  2336. Const STREAM_CONTAINS_SECURITY = &H2
  2337.  
  2338. '  Dual Mode API below this line. Dual Mode Types also included.
  2339.  
  2340. Const STARTF_USESHOWWINDOW = &H1
  2341. Const STARTF_USESIZE = &H2
  2342. Const STARTF_USEPOSITION = &H4
  2343. Const STARTF_USECOUNTCHARS = &H8
  2344. Const STARTF_USEFILLATTRIBUTE = &H10
  2345. Const STARTF_RUNFULLSCREEN = &H20        '  ignored for non-x86 platforms
  2346. Const STARTF_FORCEONFEEDBACK = &H40
  2347. Const STARTF_FORCEOFFFEEDBACK = &H80
  2348. Const STARTF_USESTDHANDLES = &H100
  2349.  
  2350. Type STARTUPINFO
  2351.         cb As Long
  2352.         lpReserved As String
  2353.         lpDesktop As String
  2354.         lpTitle As String
  2355.         dwX As Long
  2356.         dwY As Long
  2357.         dwXSize As Long
  2358.         dwYSize As Long
  2359.         dwXCountChars As Long
  2360.         dwYCountChars As Long
  2361.         dwFillAttribute As Long
  2362.         dwFlags As Long
  2363.         wShowWindow As Integer
  2364.         cbReserved2 As Integer
  2365.         lpReserved2 As Long
  2366.         hStdInput As Long
  2367.         hStdOutput As Long
  2368.         hStdError As Long
  2369. End Type
  2370.  
  2371. Const SHUTDOWN_NORETRY = &H1
  2372.  
  2373. Type WIN32_FIND_DATA
  2374.         dwFileAttributes As Long
  2375.         ftCreationTime As FILETIME
  2376.         ftLastAccessTime As FILETIME
  2377.         ftLastWriteTime As FILETIME
  2378.         nFileSizeHigh As Long
  2379.         nFileSizeLow As Long
  2380.         dwReserved0 As Long
  2381.         dwReserved1 As Long
  2382.         cFileName As String * MAX_PATH
  2383.         cAlternate As String * 14
  2384. End Type
  2385.  
  2386. Declare Function CreateMutex Lib "kernel32" Alias "CreateMutexA" (lpMutexAttributes As SECURITY_ATTRIBUTES, ByVal bInitialOwner As Long, ByVal lpName As String) As Long
  2387. Declare Function OpenMutex Lib "kernel32" Alias "OpenMutexA" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal lpName As String) As Long
  2388. Declare Function CreateEvent Lib "kernel32" Alias "CreateEventA" (lpEventAttributes As SECURITY_ATTRIBUTES, ByVal bManualReset As Long, ByVal bInitialState As Long, ByVal lpName As String) As Long
  2389. Declare Function OpenEvent Lib "kernel32" Alias "OpenEventA" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal lpName As String) As Long
  2390. Declare Function CreateSemaphore Lib "kernel32" Alias "CreateSemaphoreA" (lpSemaphoreAttributes As SECURITY_ATTRIBUTES, ByVal lInitialCount As Long, ByVal lMaximumCount As Long, ByVal lpName As String) As Long
  2391. Declare Function OpenSemaphore Lib "kernel32" Alias "OpenSemaphoreA" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal lpName As String) As Long
  2392. Declare Function CreateFileMapping Lib "kernel32" Alias "CreateFileMappingA" (ByVal hFile As Long, lpFileMappigAttributes As SECURITY_ATTRIBUTES, ByVal flProtect As Long, ByVal dwMaximumSizeHigh As Long, ByVal dwMaximumSizeLow As Long, ByVal lpName As String) As Long
  2393. Declare Function OpenFileMapping Lib "kernel32" Alias "OpenFileMappingA" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal lpName As String) As Long
  2394. Declare Function GetLogicalDriveStrings Lib "kernel32" Alias "GetLogicalDriveStringsA" (ByVal nBufferLength As Long, ByVal lpBuffer As String) As Long
  2395.  
  2396. Declare Function IsBadReadPtr Lib "kernel32" Alias "IsBadReadPtr" (lp As Any, ByVal ucb As Long) As Long
  2397. Declare Function IsBadWritePtr Lib "kernel32" Alias "IsBadWritePtr" (lp As Any, ByVal ucb As Long) As Long
  2398. Declare Function IsBadStringPtr Lib "kernel32" Alias "IsBadStringPtrA" (ByVal lpsz As String, ByVal ucchMax As Long) As Long
  2399. Declare Function IsBadHugeReadPtr Lib "kernel32" Alias "IsBadHugeReadPtr" (lp As Any, ByVal ucb As Long) As Long
  2400. Declare Function IsBadHugeWritePtr Lib "kernel32" Alias "IsBadHugeWritePtr" (lp As Any, ByVal ucb As Long) As Long
  2401.  
  2402. Declare Function LookupAccountSid Lib "advapi32.dll" Alias "LookupAccountSidA" (ByVal lpSystemName As String, Sid As Any, ByVal name As String, cbName As Long, ByVal ReferencedDomainName As String, cbReferencedDomainName As Long, peUse As Integer) As Long
  2403.  
  2404. Declare Function LookupAccountName Lib "advapi32.dll" Alias "LookupAccountNameA" (ByVal lpSystemName As String, ByVal lpAccountName As String, Sid As Long, cbSid As Long, ByVal ReferencedDomainName As String, cbReferencedDomainName As Long, peUse As Integer) As Long
  2405. Declare Function LookupPrivilegeValue Lib "advapi32.dll" Alias "LookupPrivilegeValueA" (ByVal lpSystemName As String, ByVal lpName As String, lpLuid As LARGE_INTEGER) As Long
  2406. Declare Function LookupPrivilegeName Lib "advapi32.dll" Alias "LookupPrivilegeNameA" (ByVal lpSystemName As String, lpLuid As LARGE_INTEGER, ByVal lpName As String, cbName As Long) As Long
  2407. Declare Function LookupPrivilegeDisplayName Lib "advapi32.dll" Alias "LookupPrivilegeDisplayNameA" (ByVal lpSystemName As String, ByVal lpName As String, ByVal lpDisplayName As String, cbDisplayName As Long, lpLanguageID As Long) As Long
  2408. Declare Function AllocateLocallyUniqueId Lib "advapi32.dll" Alias "AllocateLocallyUniqueId" (Luid As LARGE_INTEGER) As Long
  2409.  
  2410. Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long
  2411. Declare Function SetComputerName Lib "kernel32" Alias "SetComputerNameA" (ByVal lpComputerName As String) As Long
  2412. Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
  2413.  
  2414. ' Performance counter API's
  2415. Declare Function QueryPerformanceCounter Lib "kernel32" Alias "QueryPerformanceCounter" (lpPerformanceCount As LARGE_INTEGER) As Long
  2416. Declare Function QueryPerformanceFrequency Lib "kernel32" Alias "QueryPerformanceFrequency" (lpFrequency As LARGE_INTEGER) As Long
  2417.  
  2418. '  Abnormal termination codes
  2419. Const TC_NORMAL = 0
  2420. Const TC_HARDERR = 1
  2421. Const TC_GP_TRAP = 2
  2422. Const TC_SIGNAL = 3
  2423.  
  2424.  
  2425. ' Procedure declarations, constant definitions, and macros
  2426. ' for the NLS component
  2427.  
  2428. ' String Length Maximums
  2429. Const MAX_LEADBYTES = 12  '  5 ranges, 2 bytes ea., 0 term.
  2430.  
  2431. ' MBCS and Unicode Translation Flags.
  2432.  
  2433. Const MB_PRECOMPOSED = &H1         '  use precomposed chars
  2434. Const MB_COMPOSITE = &H2         '  use composite chars
  2435. Const MB_USEGLYPHCHARS = &H4         '  use glyph chars, not ctrl chars
  2436.  
  2437. Const WC_DEFAULTCHECK = &H100       '  check for default char
  2438. Const WC_COMPOSITECHECK = &H200       '  convert composite to precomposed
  2439. Const WC_DISCARDNS = &H10        '  discard non-spacing chars
  2440. Const WC_SEPCHARS = &H20        '  generate separate chars
  2441. Const WC_DEFAULTCHAR = &H40        '  replace w/ default char
  2442.  
  2443. ' Character Type Flags.
  2444. Const CT_CTYPE1 = &H1         '  ctype 1 information
  2445. Const CT_CTYPE2 = &H2         '  ctype 2 information
  2446. Const CT_CTYPE3 = &H4         '  ctype 3 information
  2447.  
  2448. ' CType 1 Flag Bits.
  2449. Const C1_UPPER = &H1     '  upper case
  2450. Const C1_LOWER = &H2     '  lower case
  2451. Const C1_DIGIT = &H4     '  decimal digits
  2452. Const C1_SPACE = &H8     '  spacing characters
  2453. Const C1_PUNCT = &H10    '  punctuation characters
  2454. Const C1_CNTRL = &H20    '  control characters
  2455. Const C1_BLANK = &H40    '  blank characters
  2456. Const C1_XDIGIT = &H80    '  other digits
  2457. Const C1_ALPHA = &H100   '  any letter
  2458.  
  2459. ' CType 2 Flag Bits.
  2460.  
  2461. Const C2_LEFTTORIGHT = &H1     '  left to right
  2462. Const C2_RIGHTTOLEFT = &H2     '  right to left
  2463.  
  2464. Const C2_EUROPENUMBER = &H3     '  European number, digit
  2465. Const C2_EUROPESEPARATOR = &H4     '  European numeric separator
  2466. Const C2_EUROPETERMINATOR = &H5     '  European numeric terminator
  2467. Const C2_ARABICNUMBER = &H6     '  Arabic number
  2468. Const C2_COMMONSEPARATOR = &H7     '  common numeric separator
  2469.  
  2470. Const C2_BLOCKSEPARATOR = &H8     '  block separator
  2471. Const C2_SEGMENTSEPARATOR = &H9     '  segment separator
  2472. Const C2_WHITESPACE = &HA     '  white space
  2473. Const C2_OTHERNEUTRAL = &HB     '  other neutrals
  2474.  
  2475. Const C2_NOTAPPLICABLE = &H0     '  no implicit directionality
  2476.  
  2477. ' CType 3 Flag Bits.
  2478. Const C3_NONSPACING = &H1     '  nonspacing character
  2479. Const C3_DIACRITIC = &H2     '  diacritic mark
  2480. Const C3_VOWELMARK = &H4     '  vowel mark
  2481. Const C3_SYMBOL = &H8     '  symbols
  2482.  
  2483. Const C3_NOTAPPLICABLE = &H0     '  ctype 3 is not applicable
  2484.  
  2485. ' String Flags.
  2486. Const NORM_IGNORECASE = &H1         '  ignore case
  2487. Const NORM_IGNORENONSPACE = &H2         '  ignore nonspacing chars
  2488. Const NORM_IGNORESYMBOLS = &H4         '  ignore symbols
  2489.  
  2490. ' Locale Independent Mapping Flags.
  2491. Const MAP_FOLDCZONE = &H10        '  fold compatibility zone chars
  2492. Const MAP_PRECOMPOSED = &H20        '  convert to precomposed chars
  2493. Const MAP_COMPOSITE = &H40        '  convert to composite chars
  2494. Const MAP_FOLDDIGITS = &H80        '  all digits to ASCII 0-9
  2495.  
  2496. ' Locale Dependent Mapping Flags.
  2497. Const LCMAP_LOWERCASE = &H100       '  lower case letters
  2498. Const LCMAP_UPPERCASE = &H200       '  upper case letters
  2499. Const LCMAP_SORTKEY = &H400       '  WC sort key (normalize)
  2500. Const LCMAP_BYTEREV = &H800       '  byte reversal
  2501.  
  2502. ' Sorting Flags.
  2503. Const SORT_STRINGSORT = &H1000      '  use string sort method
  2504.  
  2505. ' Code Page Default Values.
  2506. Const CP_ACP = 0  '  default to ANSI code page
  2507. Const CP_OEMCP = 1  '  default to OEM  code page
  2508.  
  2509. ' Country Codes.
  2510.  
  2511. Const CTRY_DEFAULT = 0
  2512.  
  2513. Const CTRY_AUSTRALIA = 61  '  Australia
  2514. Const CTRY_AUSTRIA = 43  '  Austria
  2515. Const CTRY_BELGIUM = 32  '  Belgium
  2516. Const CTRY_BRAZIL = 55  '  Brazil
  2517. Const CTRY_CANADA = 2  '  Canada
  2518. Const CTRY_DENMARK = 45  '  Denmark
  2519. Const CTRY_FINLAND = 358  '  Finland
  2520. Const CTRY_FRANCE = 33  '  France
  2521. Const CTRY_GERMANY = 49  '  Germany
  2522. Const CTRY_ICELAND = 354  '  Iceland
  2523. Const CTRY_IRELAND = 353  '  Ireland
  2524. Const CTRY_ITALY = 39  '  Italy
  2525. Const CTRY_JAPAN = 81  '  Japan
  2526. Const CTRY_MEXICO = 52  '  Mexico
  2527. Const CTRY_NETHERLANDS = 31  '  Netherlands
  2528. Const CTRY_NEW_ZEALAND = 64  '  New Zealand
  2529. Const CTRY_NORWAY = 47  '  Norway
  2530. Const CTRY_PORTUGAL = 351  '  Portugal
  2531. Const CTRY_PRCHINA = 86  '  PR China
  2532. Const CTRY_SOUTH_KOREA = 82  '  South Korea
  2533. Const CTRY_SPAIN = 34  '  Spain
  2534. Const CTRY_SWEDEN = 46  '  Sweden
  2535. Const CTRY_SWITZERLAND = 41  '  Switzerland
  2536. Const CTRY_TAIWAN = 886  '  Taiwan
  2537. Const CTRY_UNITED_KINGDOM = 44  '  United Kingdom
  2538. Const CTRY_UNITED_STATES = 1  '  United States
  2539.  
  2540. ' Locale Types.
  2541. ' These types are used for the GetLocaleInfoW NLS API routine.
  2542.  
  2543. ' LOCALE_NOUSEROVERRIDE is also used in GetTimeFormatW and GetDateFormatW.
  2544. Const LOCALE_NOUSEROVERRIDE = &H80000000  '  do not use user overrides
  2545.  
  2546. Const LOCALE_ILANGUAGE = &H1         '  language id
  2547. Const LOCALE_SLANGUAGE = &H2         '  localized name of language
  2548. Const LOCALE_SENGLANGUAGE = &H1001      '  English name of language
  2549. Const LOCALE_SABBREVLANGNAME = &H3         '  abbreviated language name
  2550. Const LOCALE_SNATIVELANGNAME = &H4         '  native name of language
  2551. Const LOCALE_ICOUNTRY = &H5         '  country code
  2552. Const LOCALE_SCOUNTRY = &H6         '  localized name of country
  2553. Const LOCALE_SENGCOUNTRY = &H1002      '  English name of country
  2554. Const LOCALE_SABBREVCTRYNAME = &H7         '  abbreviated country name
  2555. Const LOCALE_SNATIVECTRYNAME = &H8         '  native name of country
  2556. Const LOCALE_IDEFAULTLANGUAGE = &H9         '  default language id
  2557. Const LOCALE_IDEFAULTCOUNTRY = &HA         '  default country code
  2558. Const LOCALE_IDEFAULTCODEPAGE = &HB         '  default code page
  2559.  
  2560. Const LOCALE_SLIST = &HC         '  list item separator
  2561. Const LOCALE_IMEASURE = &HD         '  0 = metric, 1 = US
  2562.  
  2563. Const LOCALE_SDECIMAL = &HE         '  decimal separator
  2564. Const LOCALE_STHOUSAND = &HF         '  thousand separator
  2565. Const LOCALE_SGROUPING = &H10        '  digit grouping
  2566. Const LOCALE_IDIGITS = &H11        '  number of fractional digits
  2567. Const LOCALE_ILZERO = &H12        '  leading zeros for decimal
  2568. Const LOCALE_SNATIVEDIGITS = &H13        '  native ascii 0-9
  2569.  
  2570. Const LOCALE_SCURRENCY = &H14        '  local monetary symbol
  2571. Const LOCALE_SINTLSYMBOL = &H15        '  intl monetary symbol
  2572. Const LOCALE_SMONDECIMALSEP = &H16        '  monetary decimal separator
  2573. Const LOCALE_SMONTHOUSANDSEP = &H17        '  monetary thousand separator
  2574. Const LOCALE_SMONGROUPING = &H18        '  monetary grouping
  2575. Const LOCALE_ICURRDIGITS = &H19        '  # local monetary digits
  2576. Const LOCALE_IINTLCURRDIGITS = &H1A        '  # intl monetary digits
  2577. Const LOCALE_ICURRENCY = &H1B        '  positive currency mode
  2578. Const LOCALE_INEGCURR = &H1C        '  negative currency mode
  2579.  
  2580. Const LOCALE_SDATE = &H1D        '  date separator
  2581. Const LOCALE_STIME = &H1E        '  time separator
  2582. Const LOCALE_SSHORTDATE = &H1F        '  short date format string
  2583. Const LOCALE_SLONGDATE = &H20        '  long date format string
  2584. Const LOCALE_STIMEFORMAT = &H1003      '  time format string
  2585. Const LOCALE_IDATE = &H21        '  short date format ordering
  2586. Const LOCALE_ILDATE = &H22        '  long date format ordering
  2587. Const LOCALE_ITIME = &H23        '  time format specifier
  2588. Const LOCALE_ICENTURY = &H24        '  century format specifier
  2589. Const LOCALE_ITLZERO = &H25        '  leading zeros in time field
  2590. Const LOCALE_IDAYLZERO = &H26        '  leading zeros in day field
  2591. Const LOCALE_IMONLZERO = &H27        '  leading zeros in month field
  2592. Const LOCALE_S1159 = &H28        '  AM designator
  2593. Const LOCALE_S2359 = &H29        '  PM designator
  2594.  
  2595. Const LOCALE_SDAYNAME1 = &H2A        '  long name for Monday
  2596. Const LOCALE_SDAYNAME2 = &H2B        '  long name for Tuesday
  2597. Const LOCALE_SDAYNAME3 = &H2C        '  long name for Wednesday
  2598. Const LOCALE_SDAYNAME4 = &H2D        '  long name for Thursday
  2599. Const LOCALE_SDAYNAME5 = &H2E        '  long name for Friday
  2600. Const LOCALE_SDAYNAME6 = &H2F        '  long name for Saturday
  2601. Const LOCALE_SDAYNAME7 = &H30        '  long name for Sunday
  2602. Const LOCALE_SABBREVDAYNAME1 = &H31        '  abbreviated name for Monday
  2603. Const LOCALE_SABBREVDAYNAME2 = &H32        '  abbreviated name for Tuesday
  2604. Const LOCALE_SABBREVDAYNAME3 = &H33        '  abbreviated name for Wednesday
  2605. Const LOCALE_SABBREVDAYNAME4 = &H34        '  abbreviated name for Thursday
  2606. Const LOCALE_SABBREVDAYNAME5 = &H35        '  abbreviated name for Friday
  2607. Const LOCALE_SABBREVDAYNAME6 = &H36        '  abbreviated name for Saturday
  2608. Const LOCALE_SABBREVDAYNAME7 = &H37        '  abbreviated name for Sunday
  2609. Const LOCALE_SMONTHNAME1 = &H38        '  long name for January
  2610. Const LOCALE_SMONTHNAME2 = &H39        '  long name for February
  2611. Const LOCALE_SMONTHNAME3 = &H3A        '  long name for March
  2612. Const LOCALE_SMONTHNAME4 = &H3B        '  long name for April
  2613. Const LOCALE_SMONTHNAME5 = &H3C        '  long name for May
  2614. Const LOCALE_SMONTHNAME6 = &H3D        '  long name for June
  2615. Const LOCALE_SMONTHNAME7 = &H3E        '  long name for July
  2616. Const LOCALE_SMONTHNAME8 = &H3F        '  long name for August
  2617. Const LOCALE_SMONTHNAME9 = &H40        '  long name for September
  2618. Const LOCALE_SMONTHNAME10 = &H41        '  long name for October
  2619. Const LOCALE_SMONTHNAME11 = &H42        '  long name for November
  2620. Const LOCALE_SMONTHNAME12 = &H43        '  long name for December
  2621. Const LOCALE_SABBREVMONTHNAME1 = &H44        '  abbreviated name for January
  2622. Const LOCALE_SABBREVMONTHNAME2 = &H45        '  abbreviated name for February
  2623. Const LOCALE_SABBREVMONTHNAME3 = &H46        '  abbreviated name for March
  2624. Const LOCALE_SABBREVMONTHNAME4 = &H47        '  abbreviated name for April
  2625. Const LOCALE_SABBREVMONTHNAME5 = &H48        '  abbreviated name for May
  2626. Const LOCALE_SABBREVMONTHNAME6 = &H49        '  abbreviated name for June
  2627. Const LOCALE_SABBREVMONTHNAME7 = &H4A        '  abbreviated name for July
  2628. Const LOCALE_SABBREVMONTHNAME8 = &H4B        '  abbreviated name for August
  2629. Const LOCALE_SABBREVMONTHNAME9 = &H4C        '  abbreviated name for September
  2630. Const LOCALE_SABBREVMONTHNAME10 = &H4D        '  abbreviated name for October
  2631. Const LOCALE_SABBREVMONTHNAME11 = &H4E        '  abbreviated name for November
  2632. Const LOCALE_SABBREVMONTHNAME12 = &H4F        '  abbreviated name for December
  2633. Const LOCALE_SABBREVMONTHNAME13 = &H100F
  2634.  
  2635. Const LOCALE_SPOSITIVESIGN = &H50        '  positive sign
  2636. Const LOCALE_SNEGATIVESIGN = &H51        '  negative sign
  2637. Const LOCALE_IPOSSIGNPOSN = &H52        '  positive sign position
  2638. Const LOCALE_INEGSIGNPOSN = &H53        '  negative sign position
  2639. Const LOCALE_IPOSSYMPRECEDES = &H54        '  mon sym precedes pos amt
  2640. Const LOCALE_IPOSSEPBYSPACE = &H55        '  mon sym sep by space from pos amt
  2641. Const LOCALE_INEGSYMPRECEDES = &H56        '  mon sym precedes neg amt
  2642. Const LOCALE_INEGSEPBYSPACE = &H57        '  mon sym sep by space from neg amt
  2643.  
  2644. ' Time Flags for GetTimeFormatW.
  2645. Const TIME_NOMINUTESORSECONDS = &H1         '  do not use minutes or seconds
  2646. Const TIME_NOSECONDS = &H2         '  do not use seconds
  2647. Const TIME_NOTIMEMARKER = &H4         '  do not use time marker
  2648. Const TIME_FORCE24HOURFORMAT = &H8         '  always use 24 hour format
  2649.  
  2650. ' Date Flags for GetDateFormatW.
  2651. Const DATE_SHORTDATE = &H1         '  use short date picture
  2652. Const DATE_LONGDATE = &H2         '  use long date picture
  2653.  
  2654.  
  2655. ' Code Page Dependent APIs
  2656.  
  2657. Declare Function IsValidCodePage Lib "kernel32" Alias "IsValidCodePage" (ByVal CodePage As Long) As Long
  2658. Declare Function GetACP Lib "kernel32" Alias "GetACP" () As Long
  2659. Declare Function GetOEMCP Lib "kernel32" Alias "GetOEMCP" () As Long
  2660. Declare Function GetCPInfo Lib "kernel32" Alias "GetCPInfo" (ByVal CodePage As Long, lpCPInfo As CPINFO) As Long
  2661. Declare Function IsDBCSLeadByte Lib "kernel32" Alias "IsDBCSLeadByte" (ByVal bTestChar As Byte) As Long
  2662. Declare Function MultiByteToWideChar Lib "kernel32" Alias "MultiByteToWideChar" (ByVal CodePage As Long, ByVal dwFlags As Long, ByVal lpMultiByteStr As String, ByVal cchMultiByte As Long, ByVal lpWideCharStr As String, ByVal cchWideChar As Long) As Long
  2663. Declare Function WideCharToMultiByte Lib "kernel32" Alias "WideCharToMultiByte" (ByVal CodePage As Long, ByVal dwFlags As Long, ByVal lpWideCharStr As String, ByVal cchWideChar As Long, ByVal lpMultiByteStr As String, ByVal cchMultiByte As Long, ByVal lpDefaultChar As String, ByVal lpUsedDefaultChar As Long) As Long
  2664.  
  2665. ' Locale Dependent APIs
  2666.  
  2667. Declare Function CompareString Lib "kernel32" Alias "CompareStringA" (ByVal Locale As Long, ByVal dwCmpFlags As Long, ByVal lpString1 As String, ByVal cchCount1 As Long, ByVal lpString2 As String, ByVal cchCount2 As Long) As Long
  2668. Declare Function LCMapString Lib "kernel32" Alias "LCMapStringA" (ByVal Locale As Long, ByVal dwMapFlags As Long, ByVal lpSrcStr As String, ByVal cchSrc As Long, ByVal lpDestStr As String, ByVal cchDest As Long) As Long
  2669. Declare Function GetLocaleInfo Lib "kernel32" Alias "GetLocaleInfoA" (ByVal Locale As Long, ByVal LCType As Long, ByVal lpLCData As String, ByVal cchData As Long) As Long
  2670. Declare Function GetTimeFormat Lib "kernel32" Alias "GetTimeFormatA" (ByVal Locale As Long, ByVal dwFlags As Long, lpTime As SYSTEMTIME, ByVal lpFormat As String, ByVal lpTimeStr As String, ByVal cchTime As Long) As Long
  2671. Declare Function GetDateFormat Lib "kernel32" Alias "GetDateFormatA" (ByVal Locale As Long, ByVal dwFlags As Long, lpDate As SYSTEMTIME, ByVal lpFormat As String, ByVal lpDateStr As String, ByVal cchDate As Long) As Long
  2672. Declare Function SetThreadLocale Lib "kernel32" Alias "SetThreadLocale" (ByVal Locale As Long) As Long
  2673. Declare Function GetSystemDefaultLangID Lib "kernel32" Alias "GetSystemDefaultLangID" () As Integer
  2674. Declare Function GetUserDefaultLangID Lib "kernel32" Alias "GetUserDefaultLangID" () As Integer
  2675. Declare Function GetSystemDefaultLCID Lib "kernel32" Alias "GetSystemDefaultLCID" () As Long
  2676. Declare Function GetUserDefaultLCID Lib "kernel32" Alias "GetUserDefaultLCID" () As Long
  2677.  
  2678. ' Locale Independent APIs
  2679.  
  2680. Declare Function GetStringTypeA Lib "kernel32" Alias "GetStringTypeA" (ByVal lcid As Long, ByVal dwInfoType As Long, ByVal lpSrcStr As String, ByVal cchSrc As Long, lpCharType As Long) As Long
  2681. Declare Function FoldString Lib "kernel32" Alias "FoldStringA" (ByVal dwMapFlags As Long, ByVal lpSrcStr As String, ByVal cchSrc As Long, ByVal lpDestStr As String, ByVal cchDest As Long) As Long
  2682.  
  2683. ' *************************************************************************
  2684. ' *                                                                         *
  2685. ' * winnls.h -- NLS procedure declarations, constant definitions and macros *
  2686. ' *                                                                         *
  2687. ' * Copyright (c) 1991-1995, Microsoft Corp. All rights reserved.           *
  2688. ' *                                                                         *
  2689. ' **************************************************************************/
  2690.  
  2691. ' *  Calendar Types.
  2692. '  *
  2693. '  *  These types are used for the GetALTCalendarInfoW NLS API routine.
  2694. '  */
  2695. Const MAX_DEFAULTCHAR = 2
  2696. Const CAL_ICALINTVALUE = &H1                     '  calendar type
  2697. Const CAL_SCALNAME = &H2                         '  native name of calendar
  2698. Const CAL_IYEAROFFSETRANGE = &H3                 '  starting years of eras
  2699. Const CAL_SERASTRING = &H4                       '  era name for IYearOffsetRanges
  2700. Const CAL_SSHORTDATE = &H5                       '  Integer date format string
  2701. Const CAL_SLONGDATE = &H6                        '  long date format string
  2702. Const CAL_SDAYNAME1 = &H7                        '  native name for Monday
  2703. Const CAL_SDAYNAME2 = &H8                        '  native name for Tuesday
  2704. Const CAL_SDAYNAME3 = &H9                        '  native name for Wednesday
  2705. Const CAL_SDAYNAME4 = &HA                        '  native name for Thursday
  2706. Const CAL_SDAYNAME5 = &HB                        '  native name for Friday
  2707. Const CAL_SDAYNAME6 = &HC                        '  native name for Saturday
  2708. Const CAL_SDAYNAME7 = &HD                        '  native name for Sunday
  2709. Const CAL_SABBREVDAYNAME1 = &HE                  '  abbreviated name for Monday
  2710. Const CAL_SABBREVDAYNAME2 = &HF                  '  abbreviated name for Tuesday
  2711. Const CAL_SABBREVDAYNAME3 = &H10                 '  abbreviated name for Wednesday
  2712. Const CAL_SABBREVDAYNAME4 = &H11                 '  abbreviated name for Thursday
  2713. Const CAL_SABBREVDAYNAME5 = &H12                 '  abbreviated name for Friday
  2714. Const CAL_SABBREVDAYNAME6 = &H13                 '  abbreviated name for Saturday
  2715. Const CAL_SABBREVDAYNAME7 = &H14                 '  abbreviated name for Sunday
  2716. Const CAL_SMONTHNAME1 = &H15                     '  native name for January
  2717. Const CAL_SMONTHNAME2 = &H16                     '  native name for February
  2718. Const CAL_SMONTHNAME3 = &H17                     '  native name for March
  2719. Const CAL_SMONTHNAME4 = &H18                     '  native name for April
  2720. Const CAL_SMONTHNAME5 = &H19                     '  native name for May
  2721. Const CAL_SMONTHNAME6 = &H1A                     '  native name for June
  2722. Const CAL_SMONTHNAME7 = &H1B                     '  native name for July
  2723. Const CAL_SMONTHNAME8 = &H1C                     '  native name for August
  2724. Const CAL_SMONTHNAME9 = &H1D                     '  native name for September
  2725. Const CAL_SMONTHNAME10 = &H1E                    '  native name for October
  2726. Const CAL_SMONTHNAME11 = &H1F                    '  native name for November
  2727. Const CAL_SMONTHNAME12 = &H20                    '  native name for December
  2728. Const CAL_SMONTHNAME13 = &H21                    '  native name for 13th month (if any)
  2729. Const CAL_SABBREVMONTHNAME1 = &H22               '  abbreviated name for January
  2730. Const CAL_SABBREVMONTHNAME2 = &H23               '  abbreviated name for February
  2731. Const CAL_SABBREVMONTHNAME3 = &H24               '  abbreviated name for March
  2732. Const CAL_SABBREVMONTHNAME4 = &H25               '  abbreviated name for April
  2733. Const CAL_SABBREVMONTHNAME5 = &H26               '  abbreviated name for May
  2734. Const CAL_SABBREVMONTHNAME6 = &H27               '  abbreviated name for June
  2735. Const CAL_SABBREVMONTHNAME7 = &H28               '  abbreviated name for July
  2736. Const CAL_SABBREVMONTHNAME8 = &H29               '  abbreviated name for August
  2737. Const CAL_SABBREVMONTHNAME9 = &H2A               '  abbreviated name for September
  2738. Const CAL_SABBREVMONTHNAME10 = &H2B              '  abbreviated name for October
  2739. Const CAL_SABBREVMONTHNAME11 = &H2C              '  abbreviated name for November
  2740. Const CAL_SABBREVMONTHNAME12 = &H2D              '  abbreviated name for December
  2741. Const CAL_SABBREVMONTHNAME13 = &H2E              '  abbreviated name for 13th month (if any)
  2742.  
  2743. '
  2744. '  *  Calendar Enumeration Value.
  2745. '  */
  2746. Const ENUM_ALL_CALENDARS = &HFFFF                '  enumerate all calendars
  2747. '
  2748. '  *  Calendar ID Values.
  2749. '  */
  2750. Const CAL_GREGORIAN = 1                 '  Gregorian (localized) calendar
  2751. Const CAL_GREGORIAN_US = 2              '  Gregorian (U.S.) calendar
  2752. Const CAL_JAPAN = 3                     '  Japanese Emperor Era calendar
  2753. Const CAL_TAIWAN = 4                    '  Taiwan Region Era calendar
  2754. Const CAL_KOREA = 5                     '  Korean Tangun Era calendar
  2755.  
  2756. ' *************************************************************************** Typedefs
  2757. ' *
  2758. ' * Define all types for the NLS component here.
  2759. ' \***************************************************************************/
  2760. '
  2761. '  *  CP Info.
  2762. '  */
  2763.  
  2764. Type CPINFO
  2765.         MaxCharSize As Long                    '  max length (Byte) of a char
  2766.         DefaultChar(MAX_DEFAULTCHAR) As Byte   '  default character
  2767.         LeadByte(MAX_LEADBYTES) As Byte        '  lead byte ranges
  2768. End Type
  2769.  
  2770. Type NUMBERFMT
  2771.         NumDigits As Long                 '  number of decimal digits
  2772.         LeadingZero As Long '  if leading zero in decimal fields
  2773.         Grouping As Long '  group size left of decimal
  2774.         lpDecimalSep As String              '  ptr to decimal separator string
  2775.         lpThousandSep As String             '  ptr to thousand separator string
  2776.         NegativeOrder As Long '  negative number ordering
  2777. End Type
  2778. '
  2779. '  *  Currency format.
  2780. '  */
  2781.  
  2782. Type CURRENCYFMT
  2783.         NumDigits As Long '  number of decimal digits
  2784.         LeadingZero As Long '  if leading zero in decimal fields
  2785.         Grouping As Long '  group size left of decimal
  2786.         lpDecimalSep As String              '  ptr to decimal separator string
  2787.         lpThousandSep As String             '  ptr to thousand separator string
  2788.         NegativeOrder As Long '  negative currency ordering
  2789.         PositiveOrder As Long '  positive currency ordering
  2790.         lpCurrencySymbol As String          '  ptr to currency symbol string
  2791. End Type
  2792.  
  2793. Declare Function EnumTimeFormats Lib "KERNEL32" Alias "EnumTimeFormats" (ByVal lpTimeFmtEnumProc As Long, ByVal Locale As Long, ByVal dwFlags As Long) As Long
  2794. Declare Function EnumDateFormats Lib "KERNEL32" Alias "EnumDateFormats" (ByVal lpDateFmtEnumProc As Long, ByVal Locale As Long, ByVal dwFlags As Long) As Long
  2795. Declare Function IsValidLocale Lib "KERNEL32" Alias "IsValidLocale" (ByVal Locale As Long, ByVal dwFlags As Long) As Long
  2796. Declare Function ConvertDefaultLocale Lib "KERNEL32" Alias "ConvertDefaultLocale" (ByVal Locale As Long) As Long
  2797. Declare Function GetThreadLocale Lib "KERNEL32" Alias "GetThreadLocale" () As Long
  2798. Declare Function EnumSystemLocales Lib "KERNEL32" Alias "EnumSystemLocales" (ByVal lpLocaleEnumProc As Long, ByVal dwFlags As Long) As Long
  2799. Declare Function EnumSystemCodePages Lib "KERNEL32" Alias "EnumSystemCodePages" (ByVal lpCodePageEnumProc As Long, ByVal dwFlags As Long) As Long
  2800.  
  2801. ' The following section contains the Public data structures, data types,
  2802. ' and procedures exported by the NT console subsystem.
  2803.  
  2804. Type COORD
  2805.         x As Integer
  2806.         y As Integer
  2807. End Type
  2808.  
  2809. Type SMALL_RECT
  2810.         Left As Integer
  2811.         Top As Integer
  2812.         Right As Integer
  2813.         Bottom As Integer
  2814. End Type
  2815.  
  2816. Type KEY_EVENT_RECORD
  2817.         bKeyDown As Long
  2818.         wRepeatCount As Integer
  2819.         wVirtualKeyCode As Integer
  2820.         wVirtualScanCode As Integer
  2821.         uChar As Byte
  2822.         dwControlKeyState As Long
  2823. End Type
  2824.  
  2825. '  ControlKeyState flags
  2826. Const RIGHT_ALT_PRESSED = &H1     '  the right alt key is pressed.
  2827. Const LEFT_ALT_PRESSED = &H2     '  the left alt key is pressed.
  2828. Const RIGHT_CTRL_PRESSED = &H4     '  the right ctrl key is pressed.
  2829. Const LEFT_CTRL_PRESSED = &H8     '  the left ctrl key is pressed.
  2830. Const SHIFT_PRESSED = &H10    '  the shift key is pressed.
  2831. Const NUMLOCK_ON = &H20    '  the numlock light is on.
  2832. Const SCROLLLOCK_ON = &H40    '  the scrolllock light is on.
  2833. Const CAPSLOCK_ON = &H80    '  the capslock light is on.
  2834. Const ENHANCED_KEY = &H100   '  the key is enhanced.
  2835.  
  2836. Type MOUSE_EVENT_RECORD
  2837.         dwMousePosition As COORD
  2838.         dwButtonState As Long
  2839.         dwControlKeyState As Long
  2840.         dwEventFlags As Long
  2841. End Type
  2842.  
  2843. '  ButtonState flags
  2844. Const FROM_LEFT_1ST_BUTTON_PRESSED = &H1
  2845. Const RIGHTMOST_BUTTON_PRESSED = &H2
  2846. Const FROM_LEFT_2ND_BUTTON_PRESSED = &H4
  2847. Const FROM_LEFT_3RD_BUTTON_PRESSED = &H8
  2848. Const FROM_LEFT_4TH_BUTTON_PRESSED = &H10
  2849.  
  2850. '  EventFlags
  2851. Const MOUSE_MOVED = &H1
  2852. Const DOUBLE_CLICK = &H2
  2853.  
  2854. Type WINDOW_BUFFER_SIZE_RECORD
  2855.         dwSize As COORD
  2856. End Type
  2857.  
  2858. Type MENU_EVENT_RECORD
  2859.         dwCommandId As Long
  2860. End Type
  2861.  
  2862. Type FOCUS_EVENT_RECORD
  2863.         bSetFocus As Long
  2864. End Type
  2865.  
  2866. '   EventType flags:
  2867. Const KEY_EVENT = &H1     '  Event contains key event record
  2868. Const mouse_eventC = &H2     '  Event contains mouse event record
  2869. Const WINDOW_BUFFER_SIZE_EVENT = &H4     '  Event contains window change event record
  2870. Const MENU_EVENT = &H8     '  Event contains menu event record
  2871. Const FOCUS_EVENT = &H10    '  event contains focus change
  2872.  
  2873. Type CHAR_INFO
  2874.         Char As Integer
  2875.         Attributes As Integer
  2876. End Type
  2877.  
  2878. '  Attributes flags:
  2879. Const FOREGROUND_BLUE = &H1     '  text color contains blue.
  2880. Const FOREGROUND_GREEN = &H2     '  text color contains green.
  2881. Const FOREGROUND_RED = &H4     '  text color contains red.
  2882. Const FOREGROUND_INTENSITY = &H8     '  text color is intensified.
  2883. Const BACKGROUND_BLUE = &H10    '  background color contains blue.
  2884. Const BACKGROUND_GREEN = &H20    '  background color contains green.
  2885. Const BACKGROUND_RED = &H40    '  background color contains red.
  2886. Const BACKGROUND_INTENSITY = &H80    '  background color is intensified.
  2887.  
  2888. Type CONSOLE_SCREEN_BUFFER_INFO
  2889.         dwSize As COORD
  2890.         dwCursorPosition As COORD
  2891.         wAttributes As Integer
  2892.         srWindow As SMALL_RECT
  2893.         dwMaximumWindowSize As COORD
  2894. End Type
  2895.  
  2896. Type CONSOLE_CURSOR_INFO
  2897.         dwSize As Long
  2898.         bVisible As Long
  2899. End Type
  2900.  
  2901. Const CTRL_C_EVENT = 0
  2902. Const CTRL_BREAK_EVENT = 1
  2903. Const CTRL_CLOSE_EVENT = 2
  2904. '  3 is reserved!
  2905. '  4 is reserved!
  2906. Const CTRL_LOGOFF_EVENT = 5
  2907. Const CTRL_SHUTDOWN_EVENT = 6
  2908.  
  2909. ' Input Mode flags:
  2910. Const ENABLE_PROCESSED_INPUT = &H1
  2911. Const ENABLE_LINE_INPUT = &H2
  2912. Const ENABLE_ECHO_INPUT = &H4
  2913. Const ENABLE_WINDOW_INPUT = &H8
  2914. Const ENABLE_MOUSE_INPUT = &H10
  2915.  
  2916. ' Output Mode flags:
  2917. Const ENABLE_PROCESSED_OUTPUT = &H1
  2918. Const ENABLE_WRAP_AT_EOL_OUTPUT = &H2
  2919.  
  2920. Declare Function ReadConsoleOutput Lib "kernel32" Alias "ReadConsoleOutputA" (ByVal hConsoleOutput As Long, lpBuffer As CHAR_INFO, dwBufferSize As COORD, dwBufferCoord As COORD, lpReadRegion As SMALL_RECT) As Long
  2921. Declare Function WriteConsoleOutput Lib "kernel32" Alias "WriteConsoleOutputA" (ByVal hConsoleOutput As Long, lpBuffer As CHAR_INFO, dwBufferSize As COORD, dwBufferCoord As COORD, lpWriteRegion As SMALL_RECT) As Long
  2922. Declare Function ReadConsoleOutputCharacter Lib "kernel32" Alias "ReadConsoleOutputCharacterA" (ByVal hConsoleOutput As Long, ByVal lpCharacter As String, ByVal nLength As Long, dwReadCoord As COORD, lpNumberOfCharsRead As Long) As Long
  2923. Declare Function ReadConsoleOutputAttribute Lib "kernel32" Alias "ReadConsoleOutputAttribute" (ByVal hConsoleOutput As Long, lpAttribute As Long, ByVal nLength As Long, dwReadCoord As COORD, lpNumberOfAttrsRead As Long) As Long
  2924. Declare Function WriteConsoleOutputCharacter Lib "kernel32" Alias "WriteConsoleOutputCharacterA" (ByVal hConsoleOutput As Long, ByVal lpCharacter As String, ByVal nLength As Long, dwWriteCoord As COORD, lpNumberOfCharsWritten As Long) As Long
  2925.  
  2926. Declare Function WriteConsoleOutputAttribute Lib "kernel32" Alias "WriteConsoleOutputAttribute" (ByVal hConsoleOutput As Long, lpAttribute As Integer, ByVal nLength As Long, dwWriteCoord As COORD, lpNumberOfAttrsWritten As Long) As Long
  2927. Declare Function FillConsoleOutputCharacter Lib "kernel32" Alias "FillConsoleOutputCharacterA" (ByVal hConsoleOutput As Long, ByVal cCharacter As Byte, ByVal nLength As Long, dwWriteCoord As COORD, lpNumberOfCharsWritten As Long) As Long
  2928. Declare Function FillConsoleOutputAttribute Lib "kernel32" Alias "FillConsoleOutputAttribute" (ByVal hConsoleOutput As Long, ByVal wAttribute As Long, ByVal nLength As Long, dwWriteCoord As COORD, lpNumberOfAttrsWritten As Long) As Long
  2929. Declare Function GetConsoleMode Lib "kernel32" Alias "GetConsoleMode" (ByVal hConsoleHandle As Long, lpMode As Long) As Long
  2930. Declare Function GetNumberOfConsoleInputEvents Lib "kernel32" Alias "GetNumberOfConsoleInputEvents" (ByVal hConsoleInput As Long, lpNumberOfEvents As Long) As Long
  2931. Declare Function GetConsoleScreenBufferInfo Lib "kernel32" Alias "GetConsoleScreenBufferInfo" (ByVal hConsoleOutput As Long, lpConsoleScreenBufferInfo As CONSOLE_SCREEN_BUFFER_INFO) As Long
  2932. Declare Function GetLargestConsoleWindowSize Lib "kernel32" Alias "GetLargestConsoleWindowSize" (ByVal hConsoleOutput As Long) As COORD
  2933. Declare Function GetConsoleCursorInfo Lib "kernel32" Alias "GetConsoleCursorInfo" (ByVal hConsoleOutput As Long, lpConsoleCursorInfo As CONSOLE_CURSOR_INFO) As Long
  2934. Declare Function GetNumberOfConsoleMouseButtons Lib "kernel32" Alias "GetNumberOfConsoleMouseButtons" (lpNumberOfMouseButtons As Long) As Long
  2935. Declare Function SetConsoleMode Lib "kernel32" Alias "SetConsoleMode" (ByVal hConsoleHandle As Long, ByVal dwMode As Long) As Long
  2936. Declare Function SetConsoleActiveScreenBuffer Lib "kernel32" Alias "SetConsoleActiveScreenBuffer" (ByVal hConsoleOutput As Long) As Long
  2937. Declare Function FlushConsoleInputBuffer Lib "kernel32" Alias "FlushConsoleInputBuffer" (ByVal hConsoleInput As Long) As Long
  2938. Declare Function SetConsoleScreenBufferSize Lib "kernel32" Alias "SetConsoleScreenBufferSize" (ByVal hConsoleOutput As Long, dwSize As COORD) As Long
  2939. Declare Function SetConsoleCursorPosition Lib "kernel32" Alias "SetConsoleCursorPosition" (ByVal hConsoleOutput As Long, dwCursorPosition As COORD) As Long
  2940. Declare Function SetConsoleCursorInfo Lib "kernel32" Alias "SetConsoleCursorInfo" (ByVal hConsoleOutput As Long, lpConsoleCursorInfo As CONSOLE_CURSOR_INFO) As Long
  2941. Declare Function ScrollConsoleScreenBuffer Lib "kernel32" Alias "ScrollConsoleScreenBufferA" (ByVal hConsoleOutput As Long, lpScrollRectangle As SMALL_RECT, lpClipRectangle As SMALL_RECT, dwDestinationOrigin As COORD, lpFill As CHAR_INFO) As Long
  2942. Declare Function SetConsoleWindowInfo Lib "kernel32" Alias "SetConsoleWindowInfo" (ByVal hConsoleOutput As Long, ByVal bAbsolute As Long, lpConsoleWindow As SMALL_RECT) As Long
  2943. Declare Function SetConsoleTextAttribute Lib "kernel32" Alias "SetConsoleTextAttribute" (ByVal hConsoleOutput As Long, ByVal wAttributes As Long) As Long
  2944. Declare Function SetConsoleCtrlHandler Lib "kernel32" Alias "SetConsoleCtrlHandler" (ByVal HandlerRoutine As Long, ByVal Add As Long) As Long
  2945. Declare Function GenerateConsoleCtrlEvent Lib "kernel32" Alias "GenerateConsoleCtrlEvent" (ByVal dwCtrlEvent As Long, ByVal dwProcessGroupId As Long) As Long
  2946. Declare Function AllocConsole Lib "kernel32" Alias "AllocConsole" () As Long
  2947. Declare Function FreeConsole Lib "kernel32" Alias "FreeConsole" () As Long
  2948. Declare Function GetConsoleTitle Lib "kernel32" Alias "GetConsoleTitleA" (ByVal lpConsoleTitle As String, ByVal nSize As Long) As Long
  2949. Declare Function SetConsoleTitle Lib "kernel32" Alias "SetConsoleTitleA" (ByVal lpConsoleTitle As String) As Long
  2950. Declare Function ReadConsole Lib "kernel32" Alias "ReadConsoleA" (ByVal hConsoleInput As Long, lpBuffer As Any, ByVal nNumberOfCharsToRead As Long, lpNumberOfCharsRead As Long, lpReserved As Any) As Long
  2951. Declare Function WriteConsole Lib "kernel32" Alias "WriteConsoleA" (ByVal hConsoleOutput As Long, lpBuffer As Any, ByVal nNumberOfCharsToWrite As Long, lpNumberOfCharsWritten As Long, lpReserved As Any) As Long
  2952.  
  2953. Const CONSOLE_TEXTMODE_BUFFER = 1
  2954.  
  2955. Declare Function CreateConsoleScreenBuffer Lib "kernel32" Alias "CreateConsoleScreenBuffer" (ByVal dwDesiredAccess As Long, ByVal dwShareMode As Long, lpSecurityAttributes As SECURITY_ATTRIBUTES, ByVal dwFlags As Long, lpScreenBufferData As Any) As Long
  2956. Declare Function GetConsoleCP Lib "kernel32" Alias "GetConsoleCP" () As Long
  2957. Declare Function SetConsoleCP Lib "kernel32" Alias "SetConsoleCP" (ByVal wCodePageID As Long) As Long
  2958. Declare Function GetConsoleOutputCP Lib "kernel32" Alias "GetConsoleOutputCP" () As Long
  2959. Declare Function SetConsoleOutputCP Lib "kernel32" Alias "SetConsoleOutputCP" (ByVal wCodePageID As Long) As Long
  2960.  
  2961.  
  2962. ' -------------
  2963. '  GDI Section
  2964. ' -------------
  2965.  
  2966. ' Binary raster ops
  2967. Const R2_BLACK = 1       '   0
  2968. Const R2_NOTMERGEPEN = 2 '  DPon
  2969. Const R2_MASKNOTPEN = 3  '  DPna
  2970. Const R2_NOTCOPYPEN = 4  '  PN
  2971. Const R2_MASKPENNOT = 5  '  PDna
  2972. Const R2_NOT = 6 '  Dn
  2973. Const R2_XORPEN = 7      '  DPx
  2974. Const R2_NOTMASKPEN = 8  '  DPan
  2975. Const R2_MASKPEN = 9     '  DPa
  2976. Const R2_NOTXORPEN = 10  '  DPxn
  2977. Const R2_NOP = 11        '  D
  2978. Const R2_MERGENOTPEN = 12        '  DPno
  2979. Const R2_COPYPEN = 13    '  P
  2980. Const R2_MERGEPENNOT = 14        '  PDno
  2981. Const R2_MERGEPEN = 15   '  DPo
  2982. Const R2_WHITE = 16      '   1
  2983. Const R2_LAST = 16
  2984.  
  2985. '  Ternary raster operations
  2986. Const SRCCOPY = &HCC0020 ' (DWORD) dest = source
  2987. Const SRCPAINT = &HEE0086        ' (DWORD) dest = source OR dest
  2988. Const SRCAND = &H8800C6  ' (DWORD) dest = source AND dest
  2989. Const SRCINVERT = &H660046       ' (DWORD) dest = source XOR dest
  2990. Const SRCERASE = &H440328        ' (DWORD) dest = source AND (NOT dest )
  2991. Const NOTSRCCOPY = &H330008      ' (DWORD) dest = (NOT source)
  2992. Const NOTSRCERASE = &H1100A6     ' (DWORD) dest = (NOT src) AND (NOT dest)
  2993. Const MERGECOPY = &HC000CA       ' (DWORD) dest = (source AND pattern)
  2994. Const MERGEPAINT = &HBB0226      ' (DWORD) dest = (NOT source) OR dest
  2995. Const PATCOPY = &HF00021 ' (DWORD) dest = pattern
  2996. Const PATPAINT = &HFB0A09        ' (DWORD) dest = DPSnoo
  2997. Const PATINVERT = &H5A0049       ' (DWORD) dest = pattern XOR dest
  2998. Const DSTINVERT = &H550009       ' (DWORD) dest = (NOT dest)
  2999. Const BLACKNESS = &H42 ' (DWORD) dest = BLACK
  3000. Const WHITENESS = &HFF0062       ' (DWORD) dest = WHITE
  3001.  
  3002. Const GDI_ERROR = &HFFFF
  3003. Const HGDI_ERROR = &HFFFF
  3004.  
  3005. ' Region Flags
  3006. Const ERRORAPI = 0
  3007. Const NULLREGION = 1
  3008. Const SIMPLEREGION = 2
  3009. Const COMPLEXREGION = 3
  3010.  
  3011. ' CombineRgn() Styles
  3012. Const RGN_AND = 1
  3013. Const RGN_OR = 2
  3014. Const RGN_XOR = 3
  3015. Const RGN_DIFF = 4
  3016. Const RGN_COPY = 5
  3017. Const RGN_MIN = RGN_AND
  3018. Const RGN_MAX = RGN_COPY
  3019.  
  3020. ' StretchBlt() Modes
  3021. Const BLACKONWHITE = 1
  3022. Const WHITEONBLACK = 2
  3023. Const COLORONCOLOR = 3
  3024. Const HALFTONE = 4
  3025. Const MAXSTRETCHBLTMODE = 4
  3026.  
  3027. ' PolyFill() Modes
  3028. Const ALTERNATE = 1
  3029. Const WINDING = 2
  3030. Const POLYFILL_LAST = 2
  3031.  
  3032. ' Text Alignment Options
  3033. Const TA_NOUPDATECP = 0
  3034. Const TA_UPDATECP = 1
  3035.  
  3036. Const TA_LEFT = 0
  3037. Const TA_RIGHT = 2
  3038. Const TA_CENTER = 6
  3039.  
  3040. Const TA_TOP = 0
  3041. Const TA_BOTTOM = 8
  3042. Const TA_BASELINE = 24
  3043. Const TA_MASK = (TA_BASELINE + TA_CENTER + TA_UPDATECP)
  3044.  
  3045. Const VTA_BASELINE = TA_BASELINE
  3046. Const VTA_LEFT = TA_BOTTOM
  3047. Const VTA_RIGHT = TA_TOP
  3048. Const VTA_CENTER = TA_CENTER
  3049. Const VTA_BOTTOM = TA_RIGHT
  3050. Const VTA_TOP = TA_LEFT
  3051.  
  3052. Const ETO_GRAYED = 1
  3053. Const ETO_OPAQUE = 2
  3054. Const ETO_CLIPPED = 4
  3055.  
  3056. Const ASPECT_FILTERING = &H1
  3057.  
  3058. Const DCB_RESET = &H1
  3059. Const DCB_ACCUMULATE = &H2
  3060. Const DCB_DIRTY = DCB_ACCUMULATE
  3061. Const DCB_SET = (DCB_RESET Or DCB_ACCUMULATE)
  3062. Const DCB_ENABLE = &H4
  3063. Const DCB_DISABLE = &H8
  3064.  
  3065. ' Metafile Functions
  3066. Const META_SETBKCOLOR = &H201
  3067. Const META_SETBKMODE = &H102
  3068. Const META_SETMAPMODE = &H103
  3069. Const META_SETROP2 = &H104
  3070. Const META_SETRELABS = &H105
  3071. Const META_SETPOLYFILLMODE = &H106
  3072. Const META_SETSTRETCHBLTMODE = &H107
  3073. Const META_SETTEXTCHAREXTRA = &H108
  3074. Const META_SETTEXTCOLOR = &H209
  3075. Const META_SETTEXTJUSTIFICATION = &H20A
  3076. Const META_SETWINDOWORG = &H20B
  3077. Const META_SETWINDOWEXT = &H20C
  3078. Const META_SETVIEWPORTORG = &H20D
  3079. Const META_SETVIEWPORTEXT = &H20E
  3080. Const META_OFFSETWINDOWORG = &H20F
  3081. Const META_SCALEWINDOWEXT = &H410
  3082. Const META_OFFSETVIEWPORTORG = &H211
  3083. Const META_SCALEVIEWPORTEXT = &H412
  3084. Const META_LINETO = &H213
  3085. Const META_MOVETO = &H214
  3086. Const META_EXCLUDECLIPRECT = &H415
  3087. Const META_INTERSECTCLIPRECT = &H416
  3088. Const META_ARC = &H817
  3089. Const META_ELLIPSE = &H418
  3090. Const META_FLOODFILL = &H419
  3091. Const META_PIE = &H81A
  3092. Const META_RECTANGLE = &H41B
  3093. Const META_ROUNDRECT = &H61C
  3094. Const META_PATBLT = &H61D
  3095. Const META_SAVEDC = &H1E
  3096. Const META_SETPIXEL = &H41F
  3097. Const META_OFFSETCLIPRGN = &H220
  3098. Const META_TEXTOUT = &H521
  3099. Const META_BITBLT = &H922
  3100. Const META_STRETCHBLT = &HB23
  3101. Const META_POLYGON = &H324
  3102. Const META_POLYLINE = &H325
  3103. Const META_ESCAPE = &H626
  3104. Const META_RESTOREDC = &H127
  3105. Const META_FILLREGION = &H228
  3106. Const META_FRAMEREGION = &H429
  3107. Const META_INVERTREGION = &H12A
  3108. Const META_PAINTREGION = &H12B
  3109. Const META_SELECTCLIPREGION = &H12C
  3110. Const META_SELECTOBJECT = &H12D
  3111. Const META_SETTEXTALIGN = &H12E
  3112. Const META_CHORD = &H830
  3113. Const META_SETMAPPERFLAGS = &H231
  3114. Const META_EXTTEXTOUT = &HA32
  3115. Const META_SETDIBTODEV = &HD33
  3116. Const META_SELECTPALETTE = &H234
  3117. Const META_REALIZEPALETTE = &H35
  3118. Const META_ANIMATEPALETTE = &H436
  3119. Const META_SETPALENTRIES = &H37
  3120. Const META_POLYPOLYGON = &H538
  3121. Const META_RESIZEPALETTE = &H139
  3122. Const META_DIBBITBLT = &H940
  3123. Const META_DIBSTRETCHBLT = &HB41
  3124. Const META_DIBCREATEPATTERNBRUSH = &H142
  3125. Const META_STRETCHDIB = &HF43
  3126. Const META_EXTFLOODFILL = &H548
  3127. Const META_DELETEOBJECT = &H1F0
  3128. Const META_CREATEPALETTE = &HF7
  3129. Const META_CREATEPATTERNBRUSH = &H1F9
  3130. Const META_CREATEPENINDIRECT = &H2FA
  3131. Const META_CREATEFONTINDIRECT = &H2FB
  3132. Const META_CREATEBRUSHINDIRECT = &H2FC
  3133. Const META_CREATEREGION = &H6FF
  3134.  
  3135.  
  3136. ' GDI Escapes
  3137. Const NEWFRAME = 1
  3138. Const AbortDocC = 2
  3139. Const NEXTBAND = 3
  3140. Const SETCOLORTABLE = 4
  3141. Const GETCOLORTABLE = 5
  3142. Const FLUSHOUTPUT = 6
  3143. Const DRAFTMODE = 7
  3144. Const QUERYESCSUPPORT = 8
  3145. Const SETABORTPROC = 9
  3146. Const StartDocC = 10
  3147. Const EndDocC = 11
  3148. Const GETPHYSPAGESIZE = 12
  3149. Const GETPRINTINGOFFSET = 13
  3150. Const GETSCALINGFACTOR = 14
  3151. Const MFCOMMENT = 15
  3152. Const GETPENWIDTH = 16
  3153. Const SETCOPYCOUNT = 17
  3154. Const SELECTPAPERSOURCE = 18
  3155. Const DEVICEDATA = 19
  3156. Const PASSTHROUGH = 19
  3157. Const GETTECHNOLGY = 20
  3158. Const GETTECHNOLOGY = 20
  3159. Const SETLINECAP = 21
  3160. Const SETLINEJOIN = 22
  3161. Const SetMiterLimitC = 23
  3162. Const BANDINFO = 24
  3163. Const DRAWPATTERNRECT = 25
  3164. Const GETVECTORPENSIZE = 26
  3165. Const GETVECTORBRUSHSIZE = 27
  3166. Const ENABLEDUPLEX = 28
  3167. Const GETSETPAPERBINS = 29
  3168. Const GETSETPRINTORIENT = 30
  3169. Const ENUMPAPERBINS = 31
  3170. Const SETDIBSCALING = 32
  3171. Const EPSPRINTING = 33
  3172. Const ENUMPAPERMETRICS = 34
  3173. Const GETSETPAPERMETRICS = 35
  3174. Const POSTSCRIPT_DATA = 37
  3175. Const POSTSCRIPT_IGNORE = 38
  3176. Const MOUSETRAILS = 39
  3177. Const GETDEVICEUNITS = 42
  3178.  
  3179. Const GETEXTENDEDTEXTMETRICS = 256
  3180. Const GETEXTENTTABLE = 257
  3181. Const GETPAIRKERNTABLE = 258
  3182. Const GETTRACKKERNTABLE = 259
  3183. Const ExtTextOutC = 512
  3184. Const GETFACENAME = 513
  3185. Const DOWNLOADFACE = 514
  3186. Const ENABLERELATIVEWIDTHS = 768
  3187. Const ENABLEPAIRKERNING = 769
  3188. Const SETKERNTRACK = 770
  3189. Const SETALLJUSTVALUES = 771
  3190. Const SETCHARSET = 772
  3191.  
  3192. Const StretchBltC = 2048
  3193. Const GETSETSCREENPARAMS = 3072
  3194. Const BEGIN_PATH = 4096
  3195. Const CLIP_TO_PATH = 4097
  3196. Const END_PATH = 4098
  3197. Const EXT_DEVICE_CAPS = 4099
  3198. Const RESTORE_CTM = 4100
  3199. Const SAVE_CTM = 4101
  3200. Const SET_ARC_DIRECTION = 4102
  3201. Const SET_BACKGROUND_COLOR = 4103
  3202. Const SET_POLY_MODE = 4104
  3203. Const SET_SCREEN_ANGLE = 4105
  3204. Const SET_SPREAD = 4106
  3205. Const TRANSFORM_CTM = 4107
  3206. Const SET_CLIP_BOX = 4108
  3207. Const SET_BOUNDS = 4109
  3208. Const SET_MIRROR_MODE = 4110
  3209. Const OPENCHANNEL = 4110
  3210. Const DOWNLOADHEADER = 4111
  3211. Const CLOSECHANNEL = 4112
  3212. Const POSTSCRIPT_PASSTHROUGH = 4115
  3213. Const ENCAPSULATED_POSTSCRIPT = 4116
  3214.  
  3215. ' Spooler Error Codes
  3216. Const SP_NOTREPORTED = &H4000
  3217. Const SP_ERROR = (-1)
  3218. Const SP_APPABORT = (-2)
  3219. Const SP_USERABORT = (-3)
  3220. Const SP_OUTOFDISK = (-4)
  3221. Const SP_OUTOFMEMORY = (-5)
  3222.  
  3223. Const PR_JOBSTATUS = &H0
  3224.  
  3225. '  Object Definitions for EnumObjects()
  3226. Const OBJ_PEN = 1
  3227. Const OBJ_BRUSH = 2
  3228. Const OBJ_DC = 3
  3229. Const OBJ_METADC = 4
  3230. Const OBJ_PAL = 5
  3231. Const OBJ_FONT = 6
  3232. Const OBJ_BITMAP = 7
  3233. Const OBJ_REGION = 8
  3234. Const OBJ_METAFILE = 9
  3235. Const OBJ_MEMDC = 10
  3236. Const OBJ_EXTPEN = 11
  3237. Const OBJ_ENHMETADC = 12
  3238. Const OBJ_ENHMETAFILE = 13
  3239.  
  3240. '  xform stuff
  3241. Const MWT_IDENTITY = 1
  3242. Const MWT_LEFTMULTIPLY = 2
  3243. Const MWT_RIGHTMULTIPLY = 3
  3244.  
  3245. Const MWT_MIN = MWT_IDENTITY
  3246. Const MWT_MAX = MWT_RIGHTMULTIPLY
  3247.  
  3248. Type XFORM
  3249.         eM11 As Double
  3250.         eM12 As Double
  3251.         eM21 As Double
  3252.         eM22 As Double
  3253.         eDx As Double
  3254.         eDy As Double
  3255. End Type
  3256.  
  3257. ' Bitmap Header Definition
  3258. Type BITMAP '14 bytes
  3259.         bmType As Long
  3260.         bmWidth As Long
  3261.         bmHeight As Long
  3262.         bmWidthBytes As Long
  3263.         bmPlanes As Integer
  3264.         bmBitsPixel As Integer
  3265.         bmBits As Long
  3266. End Type
  3267.  
  3268. Type RGBTRIPLE
  3269.         rgbtBlue As Byte
  3270.         rgbtGreen As Byte
  3271.         rgbtRed As Byte
  3272. End Type
  3273.  
  3274. Type RGBQUAD
  3275.         rgbBlue As Byte
  3276.         rgbGreen As Byte
  3277.         rgbRed As Byte
  3278.         rgbReserved As Byte
  3279. End Type
  3280.  
  3281. ' structures for defining DIBs
  3282. Type BITMAPCOREHEADER '12 bytes
  3283.         bcSize As Long
  3284.         bcWidth As Integer
  3285.         bcHeight As Integer
  3286.         bcPlanes As Integer
  3287.         bcBitCount As Integer
  3288. End Type
  3289.  
  3290. Type BITMAPINFOHEADER '40 bytes
  3291.         biSize As Long
  3292.         biWidth As Long
  3293.         biHeight As Long
  3294.         biPlanes As Integer
  3295.         biBitCount As Integer
  3296.         biCompression As Long
  3297.         biSizeImage As Long
  3298.         biXPelsPerMeter As Long
  3299.         biYPelsPerMeter As Long
  3300.         biClrUsed As Long
  3301.         biClrImportant As Long
  3302. End Type
  3303.  
  3304. ' constants for the biCompression field
  3305. Const BI_RGB = 0&
  3306. Const BI_RLE8 = 1&
  3307. Const BI_RLE4 = 2&
  3308. Const BI_bitfields = 3&
  3309.  
  3310. Type BITMAPINFO
  3311.         bmiHeader As BITMAPINFOHEADER
  3312.         bmiColors As RGBQUAD
  3313. End Type
  3314.  
  3315. Type BITMAPCOREINFO
  3316.         bmciHeader As BITMAPCOREHEADER
  3317.         bmciColors As RGBTRIPLE
  3318. End Type
  3319.  
  3320. Type BITMAPFILEHEADER
  3321.         bfType As Integer
  3322.         bfSize As Long
  3323.         bfReserved1 As Integer
  3324.         bfReserved2 As Integer
  3325.         bfOffBits As Long
  3326. End Type
  3327.  
  3328.  
  3329. ' Clipboard Metafile Picture Structure
  3330. Type HANDLETABLE
  3331.         objectHandle(1) As Long
  3332. End Type
  3333.  
  3334. Type METARECORD
  3335.         rdSize As Long
  3336.         rdFunction As Integer
  3337.         rdParm(1) As Integer
  3338. End Type
  3339.  
  3340.  
  3341. Type METAFILEPICT
  3342.         mm As Long
  3343.         xExt As Long
  3344.         yExt As Long
  3345.         hMF As Long
  3346. End Type
  3347.  
  3348. Type METAHEADER
  3349.         mtType As Integer
  3350.         mtHeaderSize As Integer
  3351.         mtVersion As Integer
  3352.         mtSize As Long
  3353.         mtNoObjects As Integer
  3354.         mtMaxRecord As Long
  3355.         mtNoParameters As Integer
  3356. End Type
  3357.  
  3358. Type ENHMETARECORD
  3359.         iType As Long
  3360.         nSize As Long
  3361.         dParm(1) As Long
  3362. End Type
  3363.  
  3364. Type SIZEL
  3365.     cx As Long
  3366.     cy As Long
  3367. End Type
  3368.  
  3369. Type ENHMETAHEADER
  3370.         iType As Long
  3371.         nSize As Long
  3372.         rclBounds As RECTL
  3373.         rclFrame As RECTL
  3374.         dSignature As Long
  3375.         nVersion As Long
  3376.         nBytes As Long
  3377.         nRecords As Long
  3378.         nHandles As Integer
  3379.         sReserved As Integer
  3380.         nDescription As Long
  3381.         offDescription As Long
  3382.         nPalEntries As Long
  3383.         szlDevice As SIZEL
  3384.         szlMillimeters As SIZEL
  3385. End Type
  3386.  
  3387. Type TEXTMETRIC
  3388.         tmHeight As Long
  3389.         tmAscent As Long
  3390.         tmDescent As Long
  3391.         tmInternalLeading As Long
  3392.         tmExternalLeading As Long
  3393.         tmAveCharWidth As Long
  3394.         tmMaxCharWidth As Long
  3395.         tmWeight As Long
  3396.         tmOverhang As Long
  3397.         tmDigitizedAspectX As Long
  3398.         tmDigitizedAspectY As Long
  3399.         tmFirstChar As Byte
  3400.         tmLastChar As Byte
  3401.         tmDefaultChar As Byte
  3402.         tmBreakChar As Byte
  3403.         tmItalic As Byte
  3404.         tmUnderlined As Byte
  3405.         tmStruckOut As Byte
  3406.         tmPitchAndFamily As Byte
  3407.         tmCharSet As Byte
  3408. End Type
  3409.  
  3410. ' ntmFlags field flags
  3411. Const NTM_REGULAR = &H40&
  3412. Const NTM_BOLD = &H20&
  3413. Const NTM_ITALIC = &H1&
  3414.  
  3415. ' Structure passed to FONTENUMPROC
  3416. ' NOTE: NEWTEXTMETRIC is the same as TEXTMETRIC plus 4 new fields
  3417. Type NEWTEXTMETRIC
  3418.         tmHeight As Long
  3419.         tmAscent As Long
  3420.         tmDescent As Long
  3421.         tmInternalLeading As Long
  3422.         tmExternalLeading As Long
  3423.         tmAveCharWidth As Long
  3424.         tmMaxCharWidth As Long
  3425.         tmWeight As Long
  3426.         tmOverhang As Long
  3427.         tmDigitizedAspectX As Long
  3428.         tmDigitizedAspectY As Long
  3429.         tmFirstChar As Byte
  3430.         tmLastChar As Byte
  3431.         tmDefaultChar As Byte
  3432.         tmBreakChar As Byte
  3433.         tmItalic As Byte
  3434.         tmUnderlined As Byte
  3435.         tmStruckOut As Byte
  3436.         tmPitchAndFamily As Byte
  3437.         tmCharSet As Byte
  3438.         ntmFlags As Long
  3439.         ntmSizeEM As Long
  3440.         ntmCellHeight As Long
  3441.         ntmAveWidth As Long
  3442. End Type
  3443.  
  3444. '  tmPitchAndFamily flags
  3445. Const TMPF_FIXED_PITCH = &H1
  3446. Const TMPF_VECTOR = &H2
  3447. Const TMPF_DEVICE = &H8
  3448. Const TMPF_TRUETYPE = &H4
  3449.  
  3450.  
  3451. ' GDI Logical Objects:
  3452.  
  3453. Type PELARRAY
  3454.         paXCount As Long
  3455.         paYCount As Long
  3456.         paXExt As Long
  3457.         paYExt As Long
  3458.         paRGBs As Integer
  3459. End Type
  3460.  
  3461. ' Logical Brush (or Pattern)
  3462. Type LOGBRUSH
  3463.         lbStyle As Long
  3464.         lbColor As Long
  3465.         lbHatch As Long
  3466. End Type
  3467.  
  3468. ' Logical Pen
  3469. Type LOGPEN
  3470.         lopnStyle As Long
  3471.         lopnWidth As POINTAPI
  3472.         lopnColor As Long
  3473. End Type
  3474.  
  3475. Type EXTLOGPEN
  3476.         elpPenStyle As Long
  3477.         elpWidth As Long
  3478.         elpBrushStyle As Long
  3479.         elpColor As Long
  3480.         elpHatch As Long
  3481.         elpNumEntries As Long
  3482.         elpStyleEntry(1) As Long
  3483. End Type
  3484.  
  3485. Type PALETTEENTRY
  3486.         peRed As Byte
  3487.         peGreen As Byte
  3488.         peBlue As Byte
  3489.         peFlags As Byte
  3490. End Type
  3491.  
  3492. ' Logical Palette
  3493. Type LOGPALETTE
  3494.         palVersion As Integer
  3495.         palNumEntries As Integer
  3496.         palPalEntry(1) As PALETTEENTRY
  3497. End Type
  3498.  
  3499. ' Logical Font
  3500. Const LF_FACESIZE = 32
  3501. Const LF_FULLFACESIZE = 64
  3502.  
  3503. Type LOGFONT
  3504.         lfHeight As Long
  3505.         lfWidth As Long
  3506.         lfEscapement As Long
  3507.         lfOrientation As Long
  3508.         lfWeight As Long
  3509.         lfItalic As Byte
  3510.         lfUnderline As Byte
  3511.         lfStrikeOut As Byte
  3512.         lfCharSet As Byte
  3513.         lfOutPrecision As Byte
  3514.         lfClipPrecision As Byte
  3515.         lfQuality As Byte
  3516.         lfPitchAndFamily As Byte
  3517.         lfFaceName(1 To LF_FACESIZE) As Byte
  3518. End Type
  3519.  
  3520. Type NONCLIENTMETRICS
  3521.         cbSize As Long
  3522.         iBorderWidth As Long
  3523.         iScrollWidth As Long
  3524.         iScrollHeight As Long
  3525.         iCaptionWidth As Long
  3526.         iCaptionHeight As Long
  3527.         lfCaptionFont As LOGFONT
  3528.         iSMCaptionWidth As Long
  3529.         iSMCaptionHeight As Long
  3530.         lfSMCaptionFont As LOGFONT
  3531.         iMenuWidth As Long
  3532.         iMenuHeight As Long
  3533.         lfMenuFont As LOGFONT
  3534.         lfStatusFont As LOGFONT
  3535.         lfMessageFont As LOGFONT
  3536. End Type
  3537.  
  3538. Type ENUMLOGFONT
  3539.         elfLogFont As LOGFONT
  3540.         elfFullName(LF_FULLFACESIZE) As Byte
  3541.         elfStyle(LF_FACESIZE) As Byte
  3542. End Type
  3543.  
  3544. Const OUT_DEFAULT_PRECIS = 0
  3545. Const OUT_STRING_PRECIS = 1
  3546. Const OUT_CHARACTER_PRECIS = 2
  3547. Const OUT_STROKE_PRECIS = 3
  3548. Const OUT_TT_PRECIS = 4
  3549. Const OUT_DEVICE_PRECIS = 5
  3550. Const OUT_RASTER_PRECIS = 6
  3551. Const OUT_TT_ONLY_PRECIS = 7
  3552. Const OUT_OUTLINE_PRECIS = 8
  3553.  
  3554. Const CLIP_DEFAULT_PRECIS = 0
  3555. Const CLIP_CHARACTER_PRECIS = 1
  3556. Const CLIP_STROKE_PRECIS = 2
  3557. Const CLIP_MASK = &HF
  3558. Const CLIP_LH_ANGLES = 16
  3559. Const CLIP_TT_ALWAYS = 32
  3560. Const CLIP_EMBEDDED = 128
  3561.  
  3562. Const DEFAULT_QUALITY = 0
  3563. Const DRAFT_QUALITY = 1
  3564. Const PROOF_QUALITY = 2
  3565.  
  3566. Const DEFAULT_PITCH = 0
  3567. Const FIXED_PITCH = 1
  3568. Const VARIABLE_PITCH = 2
  3569.  
  3570. Const ANSI_CHARSET = 0
  3571. Const DEFAULT_CHARSET = 1
  3572. Const SYMBOL_CHARSET = 2
  3573. Const SHIFTJIS_CHARSET = 128
  3574. Const HANGEUL_CHARSET = 129
  3575. Const CHINESEBIG5_CHARSET = 136
  3576. Const OEM_CHARSET = 255
  3577.  
  3578. ' Font Families
  3579. '
  3580. Const FF_DONTCARE = 0    '  Don't care or don't know.
  3581. Const FF_ROMAN = 16      '  Variable stroke width, serifed.
  3582.  
  3583. ' Times Roman, Century Schoolbook, etc.
  3584. Const FF_SWISS = 32      '  Variable stroke width, sans-serifed.
  3585.  
  3586. ' Helvetica, Swiss, etc.
  3587. Const FF_MODERN = 48     '  Constant stroke width, serifed or sans-serifed.
  3588.  
  3589. ' Pica, Elite, Courier, etc.
  3590. Const FF_SCRIPT = 64     '  Cursive, etc.
  3591. Const FF_DECORATIVE = 80 '  Old English, etc.
  3592.  
  3593. ' Font Weights
  3594. Const FW_DONTCARE = 0
  3595. Const FW_THIN = 100
  3596. Const FW_EXTRALIGHT = 200
  3597. Const FW_LIGHT = 300
  3598. Const FW_NORMAL = 400
  3599. Const FW_MEDIUM = 500
  3600. Const FW_SEMIBOLD = 600
  3601. Const FW_BOLD = 700
  3602. Const FW_EXTRABOLD = 800
  3603. Const FW_HEAVY = 900
  3604.  
  3605. Const FW_ULTRALIGHT = FW_EXTRALIGHT
  3606. Const FW_REGULAR = FW_NORMAL
  3607. Const FW_DEMIBOLD = FW_SEMIBOLD
  3608. Const FW_ULTRABOLD = FW_EXTRABOLD
  3609. Const FW_BLACK = FW_HEAVY
  3610.  
  3611. Const PANOSE_COUNT = 10
  3612. Const PAN_FAMILYTYPE_INDEX = 0
  3613. Const PAN_SERIFSTYLE_INDEX = 1
  3614. Const PAN_WEIGHT_INDEX = 2
  3615. Const PAN_PROPORTION_INDEX = 3
  3616. Const PAN_CONTRAST_INDEX = 4
  3617. Const PAN_STROKEVARIATION_INDEX = 5
  3618. Const PAN_ARMSTYLE_INDEX = 6
  3619. Const PAN_LETTERFORM_INDEX = 7
  3620. Const PAN_MIDLINE_INDEX = 8
  3621. Const PAN_XHEIGHT_INDEX = 9
  3622.  
  3623. Const PAN_CULTURE_LATIN = 0
  3624.  
  3625. Type PANOSE
  3626.         ulculture As Long
  3627.         bFamilyType As Byte
  3628.         bSerifStyle As Byte
  3629.         bWeight As Byte
  3630.         bProportion As Byte
  3631.         bContrast As Byte
  3632.         bStrokeVariation As Byte
  3633.         bArmStyle As Byte
  3634.         bLetterform As Byte
  3635.         bMidline As Byte
  3636.         bXHeight As Byte
  3637. End Type
  3638.  
  3639. Const PAN_ANY = 0  '  Any
  3640. Const PAN_NO_FIT = 1  '  No Fit
  3641.  
  3642. Const PAN_FAMILY_TEXT_DISPLAY = 2  '  Text and Display
  3643. Const PAN_FAMILY_SCRIPT = 3  '  Script
  3644. Const PAN_FAMILY_DECORATIVE = 4  '  Decorative
  3645. Const PAN_FAMILY_PICTORIAL = 5  '  Pictorial
  3646.  
  3647. Const PAN_SERIF_COVE = 2  '  Cove
  3648. Const PAN_SERIF_OBTUSE_COVE = 3  '  Obtuse Cove
  3649. Const PAN_SERIF_SQUARE_COVE = 4  '  Square Cove
  3650. Const PAN_SERIF_OBTUSE_SQUARE_COVE = 5  '  Obtuse Square Cove
  3651. Const PAN_SERIF_SQUARE = 6  '  Square
  3652. Const PAN_SERIF_THIN = 7  '  Thin
  3653. Const PAN_SERIF_BONE = 8  '  Bone
  3654. Const PAN_SERIF_EXAGGERATED = 9  '  Exaggerated
  3655. Const PAN_SERIF_TRIANGLE = 10  '  Triangle
  3656. Const PAN_SERIF_NORMAL_SANS = 11  '  Normal Sans
  3657. Const PAN_SERIF_OBTUSE_SANS = 12  '  Obtuse Sans
  3658. Const PAN_SERIF_PERP_SANS = 13  '  Prep Sans
  3659. Const PAN_SERIF_FLARED = 14  '  Flared
  3660. Const PAN_SERIF_ROUNDED = 15  '  Rounded
  3661.  
  3662. Const PAN_WEIGHT_VERY_LIGHT = 2  '  Very Light
  3663. Const PAN_WEIGHT_LIGHT = 3  '  Light
  3664. Const PAN_WEIGHT_THIN = 4  '  Thin
  3665. Const PAN_WEIGHT_BOOK = 5  '  Book
  3666. Const PAN_WEIGHT_MEDIUM = 6  '  Medium
  3667. Const PAN_WEIGHT_DEMI = 7  '  Demi
  3668. Const PAN_WEIGHT_BOLD = 8  '  Bold
  3669. Const PAN_WEIGHT_HEAVY = 9  '  Heavy
  3670. Const PAN_WEIGHT_BLACK = 10  '  Black
  3671. Const PAN_WEIGHT_NORD = 11  '  Nord
  3672.  
  3673. Const PAN_PROP_OLD_STYLE = 2  '  Old Style
  3674. Const PAN_PROP_MODERN = 3  '  Modern
  3675. Const PAN_PROP_EVEN_WIDTH = 4  '  Even Width
  3676. Const PAN_PROP_EXPANDED = 5  '  Expanded
  3677. Const PAN_PROP_CONDENSED = 6  '  Condensed
  3678. Const PAN_PROP_VERY_EXPANDED = 7  '  Very Expanded
  3679. Const PAN_PROP_VERY_CONDENSED = 8  '  Very Condensed
  3680. Const PAN_PROP_MONOSPACED = 9  '  Monospaced
  3681.  
  3682. Const PAN_CONTRAST_NONE = 2  '  None
  3683. Const PAN_CONTRAST_VERY_LOW = 3  '  Very Low
  3684. Const PAN_CONTRAST_LOW = 4  '  Low
  3685. Const PAN_CONTRAST_MEDIUM_LOW = 5  '  Medium Low
  3686. Const PAN_CONTRAST_MEDIUM = 6  '  Medium
  3687. Const PAN_CONTRAST_MEDIUM_HIGH = 7  '  Mediim High
  3688. Const PAN_CONTRAST_HIGH = 8  '  High
  3689. Const PAN_CONTRAST_VERY_HIGH = 9  '  Very High
  3690.  
  3691. Const PAN_STROKE_GRADUAL_DIAG = 2  '  Gradual/Diagonal
  3692. Const PAN_STROKE_GRADUAL_TRAN = 3  '  Gradual/Transitional
  3693. Const PAN_STROKE_GRADUAL_VERT = 4  '  Gradual/Vertical
  3694. Const PAN_STROKE_GRADUAL_HORZ = 5  '  Gradual/Horizontal
  3695. Const PAN_STROKE_RAPID_VERT = 6  '  Rapid/Vertical
  3696. Const PAN_STROKE_RAPID_HORZ = 7  '  Rapid/Horizontal
  3697. Const PAN_STROKE_INSTANT_VERT = 8  '  Instant/Vertical
  3698.  
  3699. Const PAN_STRAIGHT_ARMS_HORZ = 2  '  Straight Arms/Horizontal
  3700. Const PAN_STRAIGHT_ARMS_WEDGE = 3  '  Straight Arms/Wedge
  3701. Const PAN_STRAIGHT_ARMS_VERT = 4  '  Straight Arms/Vertical
  3702. Const PAN_STRAIGHT_ARMS_SINGLE_SERIF = 5 '  Straight Arms/Single-Serif
  3703. Const PAN_STRAIGHT_ARMS_DOUBLE_SERIF = 6 '  Straight Arms/Double-Serif
  3704. Const PAN_BENT_ARMS_HORZ = 7  '  Non-Straight Arms/Horizontal
  3705. Const PAN_BENT_ARMS_WEDGE = 8  '  Non-Straight Arms/Wedge
  3706. Const PAN_BENT_ARMS_VERT = 9  '  Non-Straight Arms/Vertical
  3707. Const PAN_BENT_ARMS_SINGLE_SERIF = 10  '  Non-Straight Arms/Single-Serif
  3708. Const PAN_BENT_ARMS_DOUBLE_SERIF = 11  '  Non-Straight Arms/Double-Serif
  3709.  
  3710. Const PAN_LETT_NORMAL_CONTACT = 2  '  Normal/Contact
  3711. Const PAN_LETT_NORMAL_WEIGHTED = 3  '  Normal/Weighted
  3712. Const PAN_LETT_NORMAL_BOXED = 4  '  Normal/Boxed
  3713. Const PAN_LETT_NORMAL_FLATTENED = 5  '  Normal/Flattened
  3714. Const PAN_LETT_NORMAL_ROUNDED = 6  '  Normal/Rounded
  3715. Const PAN_LETT_NORMAL_OFF_CENTER = 7  '  Normal/Off Center
  3716. Const PAN_LETT_NORMAL_SQUARE = 8  '  Normal/Square
  3717. Const PAN_LETT_OBLIQUE_CONTACT = 9  '  Oblique/Contact
  3718. Const PAN_LETT_OBLIQUE_WEIGHTED = 10  '  Oblique/Weighted
  3719. Const PAN_LETT_OBLIQUE_BOXED = 11  '  Oblique/Boxed
  3720. Const PAN_LETT_OBLIQUE_FLATTENED = 12  '  Oblique/Flattened
  3721. Const PAN_LETT_OBLIQUE_ROUNDED = 13  '  Oblique/Rounded
  3722. Const PAN_LETT_OBLIQUE_OFF_CENTER = 14  '  Oblique/Off Center
  3723. Const PAN_LETT_OBLIQUE_SQUARE = 15  '  Oblique/Square
  3724.  
  3725. Const PAN_MIDLINE_STANDARD_TRIMMED = 2  '  Standard/Trimmed
  3726. Const PAN_MIDLINE_STANDARD_POINTED = 3  '  Standard/Pointed
  3727. Const PAN_MIDLINE_STANDARD_SERIFED = 4  '  Standard/Serifed
  3728. Const PAN_MIDLINE_HIGH_TRIMMED = 5  '  High/Trimmed
  3729. Const PAN_MIDLINE_HIGH_POINTED = 6  '  High/Pointed
  3730. Const PAN_MIDLINE_HIGH_SERIFED = 7  '  High/Serifed
  3731. Const PAN_MIDLINE_CONSTANT_TRIMMED = 8  '  Constant/Trimmed
  3732. Const PAN_MIDLINE_CONSTANT_POINTED = 9  '  Constant/Pointed
  3733. Const PAN_MIDLINE_CONSTANT_SERIFED = 10  '  Constant/Serifed
  3734. Const PAN_MIDLINE_LOW_TRIMMED = 11  '  Low/Trimmed
  3735. Const PAN_MIDLINE_LOW_POINTED = 12  '  Low/Pointed
  3736. Const PAN_MIDLINE_LOW_SERIFED = 13  '  Low/Serifed
  3737.  
  3738. Const PAN_XHEIGHT_CONSTANT_SMALL = 2  '  Constant/Small
  3739. Const PAN_XHEIGHT_CONSTANT_STD = 3  '  Constant/Standard
  3740. Const PAN_XHEIGHT_CONSTANT_LARGE = 4  '  Constant/Large
  3741. Const PAN_XHEIGHT_DUCKING_SMALL = 5  '  Ducking/Small
  3742. Const PAN_XHEIGHT_DUCKING_STD = 6  '  Ducking/Standard
  3743. Const PAN_XHEIGHT_DUCKING_LARGE = 7  '  Ducking/Large
  3744.  
  3745. Const ELF_VENDOR_SIZE = 4
  3746.  
  3747. Type EXTLOGFONT
  3748.         elfLogFont  As LOGFONT
  3749.         elfFullName(LF_FULLFACESIZE) As Byte
  3750.         elfStyle(LF_FACESIZE) As Byte
  3751.         elfVersion As Long
  3752.         elfStyleSize As Long
  3753.         elfMatch As Long
  3754.         elfReserved As Long
  3755.         elfVendorId(ELF_VENDOR_SIZE) As Byte
  3756.         elfCulture As Long
  3757.         elfPanose As PANOSE
  3758. End Type
  3759.  
  3760. Const ELF_VERSION = 0
  3761. Const ELF_CULTURE_LATIN = 0
  3762.  
  3763. '  EnumFonts Masks
  3764. Const RASTER_FONTTYPE = &H1
  3765. Const DEVICE_FONTTYPE = &H2
  3766. Const TRUETYPE_FONTTYPE = &H4
  3767.  
  3768. ' palette entry flags
  3769. Const PC_RESERVED = &H1  '  palette index used for animation
  3770. Const PC_EXPLICIT = &H2  '  palette index is explicit to device
  3771. Const PC_NOCOLLAPSE = &H4        '  do not match color to system palette
  3772.  
  3773. ' Background Modes
  3774. Const TRANSPARENT = 1
  3775. Const OPAQUE = 2
  3776. Const BKMODE_LAST = 2
  3777.  
  3778. '  Graphics Modes
  3779. Const GM_COMPATIBLE = 1
  3780. Const GM_ADVANCED = 2
  3781. Const GM_LAST = 2
  3782.  
  3783. '  PolyDraw and GetPath point types
  3784. Const PT_CLOSEFIGURE = &H1
  3785. Const PT_LINETO = &H2
  3786. Const PT_BEZIERTO = &H4
  3787. Const PT_MOVETO = &H6
  3788.  
  3789. '  Mapping Modes
  3790. Const MM_TEXT = 1
  3791. Const MM_LOMETRIC = 2
  3792. Const MM_HIMETRIC = 3
  3793. Const MM_LOENGLISH = 4
  3794. Const MM_HIENGLISH = 5
  3795. Const MM_TWIPS = 6
  3796. Const MM_ISOTROPIC = 7
  3797. Const MM_ANISOTROPIC = 8
  3798.  
  3799. '  Min and Max Mapping Mode values
  3800. Const MM_MIN = MM_TEXT
  3801. Const MM_MAX = MM_ANISOTROPIC
  3802. Const MM_MAX_FIXEDSCALE = MM_TWIPS
  3803.  
  3804. ' Coordinate Modes
  3805. Const ABSOLUTE = 1
  3806. Const RELATIVE = 2
  3807.  
  3808. ' Stock Logical Objects
  3809. Const WHITE_BRUSH = 0
  3810. Const LTGRAY_BRUSH = 1
  3811. Const GRAY_BRUSH = 2
  3812. Const DKGRAY_BRUSH = 3
  3813. Const BLACK_BRUSH = 4
  3814. Const NULL_BRUSH = 5
  3815. Const HOLLOW_BRUSH = NULL_BRUSH
  3816. Const WHITE_PEN = 6
  3817. Const BLACK_PEN = 7
  3818. Const NULL_PEN = 8
  3819. Const OEM_FIXED_FONT = 10
  3820. Const ANSI_FIXED_FONT = 11
  3821. Const ANSI_VAR_FONT = 12
  3822. Const SYSTEM_FONT = 13
  3823. Const DEVICE_DEFAULT_FONT = 14
  3824. Const DEFAULT_PALETTE = 15
  3825. Const SYSTEM_FIXED_FONT = 16
  3826. Const STOCK_LAST = 16
  3827.  
  3828. Const CLR_INVALID = &HFFFF
  3829.  
  3830. ' Brush Styles
  3831. Const BS_SOLID = 0
  3832. Const BS_NULL = 1
  3833. Const BS_HOLLOW = BS_NULL
  3834. Const BS_HATCHED = 2
  3835. Const BS_PATTERN = 3
  3836. Const BS_INDEXED = 4
  3837. Const BS_DIBPATTERN = 5
  3838. Const BS_DIBPATTERNPT = 6
  3839. Const BS_PATTERN8X8 = 7
  3840. Const BS_DIBPATTERN8X8 = 8
  3841.  
  3842. '  Hatch Styles
  3843. Const HS_HORIZONTAL = 0              '  -----
  3844. Const HS_VERTICAL = 1                '  |||||
  3845. Const HS_FDIAGONAL = 2               '  \\\\\
  3846. Const HS_BDIAGONAL = 3               '  /////
  3847. Const HS_CROSS = 4                   '  +++++
  3848. Const HS_DIAGCROSS = 5               '  xxxxx
  3849. Const HS_FDIAGONAL1 = 6
  3850. Const HS_BDIAGONAL1 = 7
  3851. Const HS_SOLID = 8
  3852. Const HS_DENSE1 = 9
  3853. Const HS_DENSE2 = 10
  3854. Const HS_DENSE3 = 11
  3855. Const HS_DENSE4 = 12
  3856. Const HS_DENSE5 = 13
  3857. Const HS_DENSE6 = 14
  3858. Const HS_DENSE7 = 15
  3859. Const HS_DENSE8 = 16
  3860. Const HS_NOSHADE = 17
  3861. Const HS_HALFTONE = 18
  3862. Const HS_SOLIDCLR = 19
  3863. Const HS_DITHEREDCLR = 20
  3864. Const HS_SOLIDTEXTCLR = 21
  3865. Const HS_DITHEREDTEXTCLR = 22
  3866. Const HS_SOLIDBKCLR = 23
  3867. Const HS_DITHEREDBKCLR = 24
  3868. Const HS_API_MAX = 25
  3869.  
  3870. '  Pen Styles
  3871. Const PS_SOLID = 0
  3872. Const PS_DASH = 1                    '  -------
  3873. Const PS_DOT = 2                     '  .......
  3874. Const PS_DASHDOT = 3                 '  _._._._
  3875. Const PS_DASHDOTDOT = 4              '  _.._.._
  3876. Const PS_NULL = 5
  3877. Const PS_INSIDEFRAME = 6
  3878. Const PS_USERSTYLE = 7
  3879. Const PS_ALTERNATE = 8
  3880. Const PS_STYLE_MASK = &HF
  3881.  
  3882. Const PS_ENDCAP_ROUND = &H0
  3883. Const PS_ENDCAP_SQUARE = &H100
  3884. Const PS_ENDCAP_FLAT = &H200
  3885. Const PS_ENDCAP_MASK = &HF00
  3886.  
  3887. Const PS_JOIN_ROUND = &H0
  3888. Const PS_JOIN_BEVEL = &H1000
  3889. Const PS_JOIN_MITER = &H2000
  3890. Const PS_JOIN_MASK = &HF000
  3891.  
  3892. Const PS_COSMETIC = &H0
  3893. Const PS_GEOMETRIC = &H10000
  3894. Const PS_TYPE_MASK = &HF0000
  3895.  
  3896. Const AD_COUNTERCLOCKWISE = 1
  3897. Const AD_CLOCKWISE = 2
  3898.  
  3899. '  Device Parameters for GetDeviceCaps()
  3900. Const DRIVERVERSION = 0      '  Device driver version
  3901. Const TECHNOLOGY = 2         '  Device classification
  3902. Const HORZSIZE = 4           '  Horizontal size in millimeters
  3903. Const VERTSIZE = 6           '  Vertical size in millimeters
  3904. Const HORZRES = 8            '  Horizontal width in pixels
  3905. Const VERTRES = 10           '  Vertical width in pixels
  3906. Const BITSPIXEL = 12         '  Number of bits per pixel
  3907. Const PLANES = 14            '  Number of planes
  3908. Const NUMBRUSHES = 16        '  Number of brushes the device has
  3909. Const NUMPENS = 18           '  Number of pens the device has
  3910. Const NUMMARKERS = 20        '  Number of markers the device has
  3911. Const NUMFONTS = 22          '  Number of fonts the device has
  3912. Const NUMCOLORS = 24         '  Number of colors the device supports
  3913. Const PDEVICESIZE = 26       '  Size required for device descriptor
  3914. Const CURVECAPS = 28         '  Curve capabilities
  3915. Const LINECAPS = 30          '  Line capabilities
  3916. Const POLYGONALCAPS = 32     '  Polygonal capabilities
  3917. Const TEXTCAPS = 34          '  Text capabilities
  3918. Const CLIPCAPS = 36          '  Clipping capabilities
  3919. Const RASTERCAPS = 38        '  Bitblt capabilities
  3920. Const ASPECTX = 40           '  Length of the X leg
  3921. Const ASPECTY = 42           '  Length of the Y leg
  3922. Const ASPECTXY = 44          '  Length of the hypotenuse
  3923.  
  3924. Const LOGPIXELSX = 88        '  Logical pixels/inch in X
  3925. Const LOGPIXELSY = 90        '  Logical pixels/inch in Y
  3926.  
  3927. Const SIZEPALETTE = 104      '  Number of entries in physical palette
  3928. Const NUMRESERVED = 106      '  Number of reserved entries in palette
  3929. Const COLORRES = 108         '  Actual color resolution
  3930.  
  3931. '  Printing related DeviceCaps. These replace the appropriate Escapes
  3932. Const PHYSICALWIDTH = 110 '  Physical Width in device units
  3933. Const PHYSICALHEIGHT = 111 '  Physical Height in device units
  3934. Const PHYSICALOFFSETX = 112 '  Physical Printable Area x margin
  3935. Const PHYSICALOFFSETY = 113 '  Physical Printable Area y margin
  3936. Const SCALINGFACTORX = 114 '  Scaling factor x
  3937. Const SCALINGFACTORY = 115 '  Scaling factor y
  3938.  
  3939. '  Device Capability Masks:
  3940.  
  3941. '  Device Technologies
  3942. Const DT_PLOTTER = 0             '  Vector plotter
  3943. Const DT_RASDISPLAY = 1          '  Raster display
  3944. Const DT_RASPRINTER = 2          '  Raster printer
  3945. Const DT_RASCAMERA = 3           '  Raster camera
  3946. Const DT_CHARSTREAM = 4          '  Character-stream, PLP
  3947. Const DT_METAFILE = 5            '  Metafile, VDM
  3948. Const DT_DISPFILE = 6            '  Display-file
  3949.  
  3950. '  Curve Capabilities
  3951. Const CC_NONE = 0                '  Curves not supported
  3952. Const CC_CIRCLES = 1             '  Can do circles
  3953. Const CC_PIE = 2                 '  Can do pie wedges
  3954. Const CC_CHORD = 4               '  Can do chord arcs
  3955. Const CC_ELLIPSES = 8            '  Can do ellipese
  3956. Const CC_WIDE = 16               '  Can do wide lines
  3957. Const CC_STYLED = 32             '  Can do styled lines
  3958. Const CC_WIDESTYLED = 64         '  Can do wide styled lines
  3959. Const CC_INTERIORS = 128 '  Can do interiors
  3960. Const CC_ROUNDRECT = 256 '
  3961.  
  3962. '  Line Capabilities
  3963. Const LC_NONE = 0                '  Lines not supported
  3964. Const LC_POLYLINE = 2            '  Can do polylines
  3965. Const LC_MARKER = 4              '  Can do markers
  3966. Const LC_POLYMARKER = 8          '  Can do polymarkers
  3967. Const LC_WIDE = 16               '  Can do wide lines
  3968. Const LC_STYLED = 32             '  Can do styled lines
  3969. Const LC_WIDESTYLED = 64         '  Can do wide styled lines
  3970. Const LC_INTERIORS = 128 '  Can do interiors
  3971.  
  3972. '  Polygonal Capabilities
  3973. Const PC_NONE = 0                '  Polygonals not supported
  3974. Const PC_POLYGON = 1             '  Can do polygons
  3975. Const PC_RECTANGLE = 2           '  Can do rectangles
  3976. Const PC_WINDPOLYGON = 4         '  Can do winding polygons
  3977. Const PC_TRAPEZOID = 4           '  Can do trapezoids
  3978. Const PC_SCANLINE = 8            '  Can do scanlines
  3979. Const PC_WIDE = 16               '  Can do wide borders
  3980. Const PC_STYLED = 32             '  Can do styled borders
  3981. Const PC_WIDESTYLED = 64         '  Can do wide styled borders
  3982. Const PC_INTERIORS = 128 '  Can do interiors
  3983.  
  3984. '  Polygonal Capabilities
  3985. Const CP_NONE = 0                '  No clipping of output
  3986. Const CP_RECTANGLE = 1           '  Output clipped to rects
  3987. Const CP_REGION = 2              '
  3988.  
  3989. '  Text Capabilities
  3990. Const TC_OP_CHARACTER = &H1              '  Can do OutputPrecision   CHARACTER
  3991. Const TC_OP_STROKE = &H2                 '  Can do OutputPrecision   STROKE
  3992. Const TC_CP_STROKE = &H4                 '  Can do ClipPrecision     STROKE
  3993. Const TC_CR_90 = &H8                     '  Can do CharRotAbility    90
  3994. Const TC_CR_ANY = &H10                   '  Can do CharRotAbility    ANY
  3995. Const TC_SF_X_YINDEP = &H20              '  Can do ScaleFreedom      X_YINDEPENDENT
  3996. Const TC_SA_DOUBLE = &H40                '  Can do ScaleAbility      DOUBLE
  3997. Const TC_SA_INTEGER = &H80               '  Can do ScaleAbility      INTEGER
  3998. Const TC_SA_CONTIN = &H100               '  Can do ScaleAbility      CONTINUOUS
  3999. Const TC_EA_DOUBLE = &H200               '  Can do EmboldenAbility   DOUBLE
  4000. Const TC_IA_ABLE = &H400                 '  Can do ItalisizeAbility  ABLE
  4001. Const TC_UA_ABLE = &H800                 '  Can do UnderlineAbility  ABLE
  4002. Const TC_SO_ABLE = &H1000                '  Can do StrikeOutAbility  ABLE
  4003. Const TC_RA_ABLE = &H2000                '  Can do RasterFontAble    ABLE
  4004. Const TC_VA_ABLE = &H4000                '  Can do VectorFontAble    ABLE
  4005. Const TC_RESERVED = &H8000
  4006. Const TC_SCROLLBLT = &H10000             '  do text scroll with blt
  4007.  
  4008. '  Raster Capabilities
  4009. Const RC_NONE = 0
  4010. Const RC_BITBLT = 1                  '  Can do standard BLT.
  4011. Const RC_BANDING = 2                 '  Device requires banding support
  4012. Const RC_SCALING = 4                 '  Device requires scaling support
  4013. Const RC_BITMAP64 = 8                '  Device can support >64K bitmap
  4014. Const RC_GDI20_OUTPUT = &H10             '  has 2.0 output calls
  4015. Const RC_GDI20_STATE = &H20
  4016. Const RC_SAVEBITMAP = &H40
  4017. Const RC_DI_BITMAP = &H80                '  supports DIB to memory
  4018. Const RC_PALETTE = &H100                 '  supports a palette
  4019. Const RC_DIBTODEV = &H200                '  supports DIBitsToDevice
  4020. Const RC_BIGFONT = &H400                 '  supports >64K fonts
  4021. Const RC_STRETCHBLT = &H800              '  supports StretchBlt
  4022. Const RC_FLOODFILL = &H1000              '  supports FloodFill
  4023. Const RC_STRETCHDIB = &H2000             '  supports StretchDIBits
  4024. Const RC_OP_DX_OUTPUT = &H4000
  4025. Const RC_DEVBITS = &H8000
  4026.  
  4027. ' DIB color table identifiers
  4028. Const DIB_RGB_COLORS = 0 '  color table in RGBs
  4029. Const DIB_PAL_COLORS = 1 '  color table in palette indices
  4030. Const DIB_PAL_INDICES = 2 '  No color table indices into surf palette
  4031. Const DIB_PAL_PHYSINDICES = 2 '  No color table indices into surf palette
  4032. Const DIB_PAL_LOGINDICES = 4 '  No color table indices into DC palette
  4033.  
  4034. ' constants for Get/SetSystemPaletteUse()
  4035. Const SYSPAL_ERROR = 0
  4036. Const SYSPAL_STATIC = 1
  4037. Const SYSPAL_NOSTATIC = 2
  4038.  
  4039. ' constants for CreateDIBitmap
  4040. Const CBM_CREATEDIB = &H2      '  create DIB bitmap
  4041. Const CBM_INIT = &H4           '  initialize bitmap
  4042.  
  4043. ' ExtFloodFill style flags
  4044. Const FLOODFILLBORDER = 0
  4045. Const FLOODFILLSURFACE = 1
  4046.  
  4047. '  size of a device name string
  4048. Const CCHDEVICENAME = 32
  4049.  
  4050. '  size of a form name string
  4051. Const CCHFORMNAME = 32
  4052.  
  4053. Type DEVMODE
  4054.         dmDeviceName As String * CCHDEVICENAME
  4055.         dmSpecVersion As Integer
  4056.         dmDriverVersion As Integer
  4057.         dmSize As Integer
  4058.         dmDriverExtra As Integer
  4059.         dmFields As Long
  4060.         dmOrientation As Integer
  4061.         dmPaperSize As Integer
  4062.         dmPaperLength As Integer
  4063.         dmPaperWidth As Integer
  4064.         dmScale As Integer
  4065.         dmCopies As Integer
  4066.         dmDefaultSource As Integer
  4067.         dmPrintQuality As Integer
  4068.         dmColor As Integer
  4069.         dmDuplex As Integer
  4070.         dmYResolution As Integer
  4071.         dmTTOption As Integer
  4072.         dmCollate As Integer
  4073.         dmFormName As String * CCHFORMNAME
  4074.         dmUnusedPadding As Integer
  4075.         dmBitsPerPel As Long
  4076.         dmPelsWidth As Long
  4077.         dmPelsHeight As Long
  4078.         dmDisplayFlags As Long
  4079.         dmDisplayFrequency As Long
  4080. End Type
  4081.  
  4082. ' current version of specification
  4083. Const DM_SPECVERSION = &H320
  4084.  
  4085. ' field selection bits
  4086. Const DM_ORIENTATION = &H1&
  4087. Const DM_PAPERSIZE = &H2&
  4088. Const DM_PAPERLENGTH = &H4&
  4089. Const DM_PAPERWIDTH = &H8&
  4090. Const DM_SCALE = &H10&
  4091. Const DM_COPIES = &H100&
  4092. Const DM_DEFAULTSOURCE = &H200&
  4093. Const DM_PRINTQUALITY = &H400&
  4094. Const DM_COLOR = &H800&
  4095. Const DM_DUPLEX = &H1000&
  4096. Const DM_YRESOLUTION = &H2000&
  4097. Const DM_TTOPTION = &H4000&
  4098. Const DM_COLLATE As Long = &H8000
  4099. Const DM_FORMNAME As Long = &H10000
  4100.  
  4101. '  orientation selections
  4102. Const DMORIENT_PORTRAIT = 1
  4103. Const DMORIENT_LANDSCAPE = 2
  4104.  
  4105. '  paper selections
  4106. Const DMPAPER_LETTER = 1
  4107. Const DMPAPER_FIRST = DMPAPER_LETTER
  4108.                '  Letter 8 1/2 x 11 in
  4109. Const DMPAPER_LETTERSMALL = 2            '  Letter Small 8 1/2 x 11 in
  4110. Const DMPAPER_TABLOID = 3                '  Tabloid 11 x 17 in
  4111. Const DMPAPER_LEDGER = 4                 '  Ledger 17 x 11 in
  4112. Const DMPAPER_LEGAL = 5                  '  Legal 8 1/2 x 14 in
  4113. Const DMPAPER_STATEMENT = 6              '  Statement 5 1/2 x 8 1/2 in
  4114. Const DMPAPER_EXECUTIVE = 7              '  Executive 7 1/4 x 10 1/2 in
  4115. Const DMPAPER_A3 = 8                     '  A3 297 x 420 mm
  4116. Const DMPAPER_A4 = 9                     '  A4 210 x 297 mm
  4117. Const DMPAPER_A4SMALL = 10               '  A4 Small 210 x 297 mm
  4118. Const DMPAPER_A5 = 11                    '  A5 148 x 210 mm
  4119. Const DMPAPER_B4 = 12                    '  B4 250 x 354
  4120. Const DMPAPER_B5 = 13                    '  B5 182 x 257 mm
  4121. Const DMPAPER_FOLIO = 14                 '  Folio 8 1/2 x 13 in
  4122. Const DMPAPER_QUARTO = 15                '  Quarto 215 x 275 mm
  4123. Const DMPAPER_10X14 = 16                 '  10x14 in
  4124. Const DMPAPER_11X17 = 17                 '  11x17 in
  4125. Const DMPAPER_NOTE = 18                  '  Note 8 1/2 x 11 in
  4126. Const DMPAPER_ENV_9 = 19                 '  Envelope #9 3 7/8 x 8 7/8
  4127. Const DMPAPER_ENV_10 = 20                '  Envelope #10 4 1/8 x 9 1/2
  4128. Const DMPAPER_ENV_11 = 21                '  Envelope #11 4 1/2 x 10 3/8
  4129. Const DMPAPER_ENV_12 = 22                '  Envelope #12 4 \276 x 11
  4130. Const DMPAPER_ENV_14 = 23                '  Envelope #14 5 x 11 1/2
  4131. Const DMPAPER_CSHEET = 24                '  C size sheet
  4132. Const DMPAPER_DSHEET = 25                '  D size sheet
  4133. Const DMPAPER_ESHEET = 26                '  E size sheet
  4134. Const DMPAPER_ENV_DL = 27                '  Envelope DL 110 x 220mm
  4135. Const DMPAPER_ENV_C5 = 28                '  Envelope C5 162 x 229 mm
  4136. Const DMPAPER_ENV_C3 = 29                '  Envelope C3  324 x 458 mm
  4137. Const DMPAPER_ENV_C4 = 30                '  Envelope C4  229 x 324 mm
  4138. Const DMPAPER_ENV_C6 = 31                '  Envelope C6  114 x 162 mm
  4139. Const DMPAPER_ENV_C65 = 32               '  Envelope C65 114 x 229 mm
  4140. Const DMPAPER_ENV_B4 = 33                '  Envelope B4  250 x 353 mm
  4141. Const DMPAPER_ENV_B5 = 34                '  Envelope B5  176 x 250 mm
  4142. Const DMPAPER_ENV_B6 = 35                '  Envelope B6  176 x 125 mm
  4143. Const DMPAPER_ENV_ITALY = 36             '  Envelope 110 x 230 mm
  4144. Const DMPAPER_ENV_MONARCH = 37           '  Envelope Monarch 3.875 x 7.5 in
  4145. Const DMPAPER_ENV_PERSONAL = 38          '  6 3/4 Envelope 3 5/8 x 6 1/2 in
  4146. Const DMPAPER_FANFOLD_US = 39            '  US Std Fanfold 14 7/8 x 11 in
  4147. Const DMPAPER_FANFOLD_STD_GERMAN = 40    '  German Std Fanfold 8 1/2 x 12 in
  4148. Const DMPAPER_FANFOLD_LGL_GERMAN = 41    '  German Legal Fanfold 8 1/2 x 13 in
  4149.  
  4150. Const DMPAPER_LAST = DMPAPER_FANFOLD_LGL_GERMAN
  4151.  
  4152. Const DMPAPER_USER = 256
  4153.  
  4154. '  bin selections
  4155. Const DMBIN_UPPER = 1
  4156. Const DMBIN_FIRST = DMBIN_UPPER
  4157.  
  4158. Const DMBIN_ONLYONE = 1
  4159. Const DMBIN_LOWER = 2
  4160. Const DMBIN_MIDDLE = 3
  4161. Const DMBIN_MANUAL = 4
  4162. Const DMBIN_ENVELOPE = 5
  4163. Const DMBIN_ENVMANUAL = 6
  4164. Const DMBIN_AUTO = 7
  4165. Const DMBIN_TRACTOR = 8
  4166. Const DMBIN_SMALLFMT = 9
  4167. Const DMBIN_LARGEFMT = 10
  4168. Const DMBIN_LARGECAPACITY = 11
  4169. Const DMBIN_CASSETTE = 14
  4170. Const DMBIN_LAST = DMBIN_CASSETTE
  4171.  
  4172. Const DMBIN_USER = 256               '  device specific bins start here
  4173.  
  4174. '  print qualities
  4175. Const DMRES_DRAFT = (-1)
  4176. Const DMRES_LOW = (-2)
  4177. Const DMRES_MEDIUM = (-3)
  4178. Const DMRES_HIGH = (-4)
  4179.  
  4180. '  color enable/disable for color printers
  4181. Const DMCOLOR_MONOCHROME = 1
  4182. Const DMCOLOR_COLOR = 2
  4183.  
  4184. '  duplex enable
  4185. Const DMDUP_SIMPLEX = 1
  4186. Const DMDUP_VERTICAL = 2
  4187. Const DMDUP_HORIZONTAL = 3
  4188.  
  4189. '  TrueType options
  4190. Const DMTT_BITMAP = 1            '  print TT fonts as graphics
  4191. Const DMTT_DOWNLOAD = 2          '  download TT fonts as soft fonts
  4192. Const DMTT_SUBDEV = 3            '  substitute device fonts for TT fonts
  4193.  
  4194. '  Collation selections
  4195. Const DMCOLLATE_FALSE = 0
  4196. Const DMCOLLATE_TRUE = 1
  4197.  
  4198. '  DEVMODE dmDisplayFlags flags
  4199.  
  4200. Const DM_GRAYSCALE = &H1
  4201. Const DM_INTERLACED = &H2
  4202.  
  4203. '  GetRegionData/ExtCreateRegion
  4204.  
  4205. Const RDH_RECTANGLES = 1
  4206.  
  4207. Type RGNDATAHEADER
  4208.         dwSize As Long
  4209.         iType As Long
  4210.         nCount As Long
  4211.         nRgnSize As Long
  4212.         rcBound As Rect
  4213. End Type
  4214.  
  4215. Type RGNDATA
  4216.         rdh As RGNDATAHEADER
  4217.         Buffer As Byte
  4218. End Type
  4219.  
  4220. Type ABC
  4221.         abcA As Long
  4222.         abcB As Long
  4223.         abcC As Long
  4224. End Type
  4225.  
  4226. Type ABCFLOAT
  4227.         abcfA As Double
  4228.         abcfB As Double
  4229.         abcfC As Double
  4230. End Type
  4231.  
  4232. Type OUTLINETEXTMETRIC
  4233.         otmSize As Long
  4234.         otmTextMetrics As TEXTMETRIC
  4235.         otmFiller As Byte
  4236.         otmPanoseNumber As PANOSE
  4237.         otmfsSelection As Long
  4238.         otmfsType As Long
  4239.         otmsCharSlopeRise As Long
  4240.         otmsCharSlopeRun As Long
  4241.         otmItalicAngle As Long
  4242.         otmEMSquare As Long
  4243.         otmAscent As Long
  4244.         otmDescent As Long
  4245.         otmLineGap As Long
  4246.         otmsCapEmHeight As Long
  4247.         otmsXHeight As Long
  4248.         otmrcFontBox As Rect
  4249.         otmMacAscent As Long
  4250.         otmMacDescent As Long
  4251.         otmMacLineGap As Long
  4252.         otmusMinimumPPEM As Long
  4253.         otmptSubscriptSize As POINTAPI
  4254.         otmptSubscriptOffset As POINTAPI
  4255.         otmptSuperscriptSize As POINTAPI
  4256.         otmptSuperscriptOffset As POINTAPI
  4257.         otmsStrikeoutSize As Long
  4258.         otmsStrikeoutPosition As Long
  4259.         otmsUnderscorePosition As Long
  4260.         otmsUnderscoreSize As Long
  4261.         otmpFamilyName As String
  4262.         otmpFaceName As String
  4263.         otmpStyleName As String
  4264.         otmpFullName As String
  4265. End Type
  4266.  
  4267. Type POLYTEXT
  4268.         x As Long
  4269.         y As Long
  4270.         n As Long
  4271.         lpStr As String
  4272.         uiFlags As Long
  4273.         rcl As Rect
  4274.         pdx As Long
  4275. End Type
  4276.  
  4277. Type FIXED
  4278.         fract As Integer
  4279.         Value As Integer
  4280. End Type
  4281.  
  4282. Type MAT2
  4283.         eM11 As FIXED
  4284.         eM12 As FIXED
  4285.         eM21 As FIXED
  4286.         eM22 As FIXED
  4287. End Type
  4288.  
  4289. Type GLYPHMETRICS
  4290.         gmBlackBoxX As Long
  4291.         gmBlackBoxY As Long
  4292.         gmptGlyphOrigin As POINTAPI
  4293.         gmCellIncX As Integer
  4294.         gmCellIncY As Integer
  4295. End Type
  4296.  
  4297.  
  4298. ' GetGlyphOutline constants
  4299. Const GGO_METRICS = 0
  4300. Const GGO_BITMAP = 1
  4301. Const GGO_NATIVE = 2
  4302.  
  4303. Const TT_POLYGON_TYPE = 24
  4304.  
  4305. Const TT_PRIM_LINE = 1
  4306. Const TT_PRIM_QSPLINE = 2
  4307.  
  4308. Type POINTFX
  4309.         x As FIXED
  4310.         y As FIXED
  4311. End Type
  4312.  
  4313. Type TTPOLYCURVE
  4314.         wType As Integer
  4315.         cpfx As Integer
  4316.         apfx As POINTFX
  4317. End Type
  4318.  
  4319. Type TTPOLYGONHEADER
  4320.         cb As Long
  4321.         dwType As Long
  4322.         pfxStart As POINTFX
  4323. End Type
  4324.  
  4325. Type RASTERIZER_STATUS
  4326.         nSize As Integer
  4327.         wFlags As Integer
  4328.         nLanguageID As Integer
  4329. End Type
  4330.  
  4331. ' bits defined in wFlags of RASTERIZER_STATUS
  4332. Const TT_AVAILABLE = &H1
  4333. Const TT_ENABLED = &H2
  4334.  
  4335. Declare Function AddFontResource Lib "gdi32" Alias "AddFontResourceA" (ByVal lpFileName As String) As Long
  4336.  
  4337. Declare Function AnimatePalette Lib "gdi32" Alias "AnimatePaletteA" (ByVal hPalette As Long, ByVal wStartIndex As Long, ByVal wNumEntries As Long, lpPaletteColors As PALETTEENTRY) As Long
  4338. Declare Function Arc Lib "gdi32" Alias "Arc" (ByVal hdc As Long, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long, ByVal X3 As Long, ByVal Y3 As Long, ByVal X4 As Long, ByVal Y4 As Long) As Long
  4339. Declare Function BitBlt Lib "gdi32" Alias "BitBlt" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
  4340. Declare Function CancelDC Lib "gdi32" Alias "CancelDC" (ByVal hdc As Long) As Long
  4341. Declare Function Chord Lib "gdi32" Alias "Chord" (ByVal hdc As Long, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long, ByVal X3 As Long, ByVal Y3 As Long, ByVal X4 As Long, ByVal Y4 As Long) As Long
  4342. Declare Function CloseMetaFile Lib "gdi32" Alias "CloseMetaFile" (ByVal hMF As Long) As Long
  4343. Declare Function CombineRgn Lib "gdi32" Alias "CombineRgn" (ByVal hDestRgn As Long, ByVal hSrcRgn1 As Long, ByVal hSrcRgn2 As Long, ByVal nCombineMode As Long) As Long
  4344. Declare Function CopyMetaFile Lib "gdi32" Alias "CopyMetaFileA" (ByVal hMF As Long, ByVal lpFileName As String) As Long
  4345.  
  4346. Declare Function CreateBitmap Lib "gdi32" Alias "CreateBitmap" (ByVal nWidth As Long, ByVal nHeight As Long, ByVal nPlanes As Long, ByVal nBitCount As Long, lpBits As Any) As Long
  4347. Declare Function CreateBitmapIndirect Lib "gdi32" Alias "CreateBitmapIndirect" (lpBitmap As BITMAP) As Long
  4348. Declare Function CreateBrushIndirect Lib "gdi32" Alias "CreateBrushIndirect" (lpLogBrush As LOGBRUSH) As Long
  4349. Declare Function CreateCompatibleBitmap Lib "gdi32" Alias "CreateCompatibleBitmap" (ByVal hdc As Long, ByVal nWidth As Long, ByVal nHeight As Long) As Long
  4350. Declare Function CreateDiscardableBitmap Lib "gdi32" Alias "CreateDiscardableBitmap" (ByVal hdc As Long, ByVal nWidth As Long, ByVal nHeight As Long) As Long
  4351.  
  4352. Declare Function CreateCompatibleDC Lib "gdi32" Alias "CreateCompatibleDC" (ByVal hdc As Long) As Long
  4353. Declare Function CreateDC Lib "gdi32" Alias "CreateDCA" (ByVal lpDriverName As String, ByVal lpDeviceName As String, ByVal lpOutput As String, lpInitData As DEVMODE) As Long
  4354.  
  4355. Declare Function CreateDIBitmap Lib "gdi32" Alias "CreateDIBitmap" (ByVal hdc As Long, lpInfoHeader As BITMAPINFOHEADER, ByVal dwUsage As Long, lpInitBits As Any, lpInitInfo As BITMAPINFO, ByVal wUsage As Long) As Long
  4356. Declare Function CreateDIBPatternBrush Lib "gdi32" Alias "CreateDIBPatternBrush" (ByVal hPackedDIB As Long, ByVal wUsage As Long) As Long
  4357. Declare Function CreateDIBPatternBrushPt Lib "gdi32" Alias "CreateDIBPatternBrushPt" (lpPackedDIB As Any, ByVal iUsage As Long) As Long
  4358. Declare Function CreateEllipticRgnIndirect Lib "gdi32" Alias "CreateEllipticRgnIndirect" (lpRect As Rect) As Long
  4359. Declare Function CreateEllipticRgn Lib "gdi32" Alias "CreateEllipticRgn" (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
  4360.  
  4361. Declare Function CreateFontIndirect Lib "gdi32" Alias "CreateFontIndirectA" (lpLogFont As LOGFONT) As Long
  4362. Declare Function CreateFont Lib "gdi32" Alias "CreateFontA" (ByVal H As Long, ByVal W As Long, ByVal E As Long, ByVal O As Long, ByVal W As Long, ByVal I As Long, ByVal u As Long, ByVal S As Long, ByVal C As Long, ByVal OP As Long, ByVal CP As Long, ByVal Q As Long, ByVal PAF As Long, ByVal F As String) As Long
  4363.  
  4364. Declare Function CreateHatchBrush Lib "gdi32" Alias "CreateHatchBrush" (ByVal nIndex As Long, ByVal crColor As Long) As Long
  4365. Declare Function CreateIC Lib "gdi32" Alias "CreateICA" (ByVal lpDriverName As String, ByVal lpDeviceName As String, ByVal lpOutput As String, lpInitData As DEVMODE) As Long
  4366.  
  4367. Declare Function CreateMetaFile Lib "gdi32" Alias "CreateMetaFileA" (ByVal lpString As String) As Long
  4368.  
  4369. Declare Function CreatePalette Lib "gdi32" Alias "CreatePalette" (lpLogPalette As LOGPALETTE) As Long
  4370. Declare Function CreatePen Lib "gdi32" Alias "CreatePen" (ByVal nPenStyle As Long, ByVal nWidth As Long, ByVal crColor As Long) As Long
  4371. Declare Function CreatePenIndirect Lib "gdi32" Alias "CreatePenIndirect" (lpLogPen As LOGPEN) As Long
  4372. Declare Function CreateRectRgn Lib "gdi32" Alias "CreateRectRgn" (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
  4373. Declare Function CreateRectRgnIndirect Lib "gdi32" Alias "CreateRectRgnIndirect" (lpRect As RECT) As Long
  4374. Declare Function CreatePolyPolygonRgn Lib "gdi32" Alias "CreatePolyPolygonRgn" (lpPoint As POINTAPI, lpPolyCounts As Long, ByVal nCount As Long, ByVal nPolyFillMode As Long) As Long
  4375. Declare Function CreatePatternBrush Lib "gdi32" Alias "CreatePatternBrush" (ByVal hBitmap As Long) As Long
  4376. Declare Function CreateRoundRectRgn Lib "gdi32" Alias "CreateRoundRectRgn" (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long, ByVal X3 As Long, ByVal Y3 As Long) As Long
  4377. Declare Function CreateScalableFontResource Lib "gdi32" Alias "CreateScalableFontResourceA" (ByVal fHidden As Long, ByVal lpszResourceFile As String, ByVal lpszFontFile As String, ByVal lpszCurrentPath As String) As Long
  4378. Declare Function CreateSolidBrush Lib "gdi32" Alias "CreateSolidBrush" (ByVal crColor As Long) As Long
  4379.  
  4380. Declare Function DeleteDC Lib "gdi32" Alias "DeleteDC" (ByVal hdc As Long) As Long
  4381. Declare Function DeleteObject Lib "gdi32" Alias "DeleteObject" (ByVal hObject As Long) As Long
  4382. Declare Function DeleteMetaFile Lib "gdi32" Alias "DeleteMetaFile" (ByVal hMF As Long) As Long
  4383.  
  4384. '  mode selections for the device mode function
  4385. Const DM_UPDATE = 1
  4386. Const DM_COPY = 2
  4387. Const DM_PROMPT = 4
  4388. Const DM_MODIFY = 8
  4389.  
  4390. Const DM_IN_BUFFER = DM_MODIFY
  4391. Const DM_IN_PROMPT = DM_PROMPT
  4392. Const DM_OUT_BUFFER = DM_COPY
  4393. Const DM_OUT_DEFAULT = DM_UPDATE
  4394.  
  4395. '  device capabilities indices
  4396. Const DC_FIELDS = 1
  4397. Const DC_PAPERS = 2
  4398. Const DC_PAPERSIZE = 3
  4399. Const DC_MINEXTENT = 4
  4400. Const DC_MAXEXTENT = 5
  4401. Const DC_BINS = 6
  4402. Const DC_DUPLEX = 7
  4403. Const DC_SIZE = 8
  4404. Const DC_EXTRA = 9
  4405. Const DC_VERSION = 10
  4406. Const DC_DRIVER = 11
  4407. Const DC_BINNAMES = 12
  4408. Const DC_ENUMRESOLUTIONS = 13
  4409. Const DC_FILEDEPENDENCIES = 14
  4410. Const DC_TRUETYPE = 15
  4411. Const DC_PAPERNAMES = 16
  4412. Const DC_ORIENTATION = 17
  4413. Const DC_COPIES = 18
  4414.  
  4415. '  bit fields of the return value (DWORD) for DC_TRUETYPE
  4416. Const DCTT_BITMAP = &H1&
  4417. Const DCTT_DOWNLOAD = &H2&
  4418. Const DCTT_SUBDEV = &H4&
  4419.  
  4420. Declare Function DeviceCapabilities Lib "winspool.drv" Alias "DeviceCapabilitiesA" (ByVal lpDeviceName As String, ByVal lpPort As String, ByVal iIndex As Long, ByVal lpOutput As String, lpDevMode As DEVMODE) As Long
  4421.  
  4422. Declare Function Ellipse Lib "gdi32" Alias "Ellipse" (ByVal hdc As Long, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
  4423.  
  4424. Declare Function EqualRgn Lib "gdi32" Alias "EqualRgn" (ByVal hSrcRgn1 As Long, ByVal hSrcRgn2 As Long) As Long
  4425. Declare Function Escape Lib "gdi32" Alias "Escape" (ByVal hdc As Long, ByVal nEscape As Long, ByVal nCount As Long, ByVal lpInData As String, lpOutData As Any) As Long
  4426. Declare Function ExtEscape Lib "gdi32" Alias "ExtEscape" (ByVal hdc As Long, ByVal nEscape As Long, ByVal cbInput As Long, ByVal lpszInData As String, ByVal cbOutput As Long, ByVal lpszOutData As String) As Long
  4427. Declare Function DrawEscape Lib "gdi32" Alias "DrawEscape" (ByVal hdc As Long, ByVal nEscape As Long, ByVal cbInput As Long, ByVal lpszInData As String) As Long
  4428. Declare Function ExcludeClipRect Lib "gdi32" Alias "ExcludeClipRect" (ByVal hdc As Long, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
  4429. Declare Function ExtCreateRegion Lib "gdi32" Alias "ExtCreateRegion" (lpXform As xform, ByVal nCount As Long, lpRgnData As RGNDATA) As Long
  4430. Declare Function ExtFloodFill Lib "gdi32" Alias "ExtFloodFill" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal crColor As Long, ByVal wFillType As Long) As Long
  4431. Declare Function FillRgn Lib "gdi32" Alias "FillRgn" (ByVal hdc As Long, ByVal hRgn As Long, ByVal hBrush As Long) As Long
  4432. Declare Function FrameRgn Lib "gdi32" Alias "FrameRgn" (ByVal hdc As Long, ByVal hRgn As Long, ByVal hBrush As Long, ByVal nWidth As Long, ByVal nHeight As Long) As Long
  4433. Declare Function FloodFill Lib "gdi32" Alias "FloodFill" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal crColor As Long) As Long
  4434. Declare Function GetROP2 Lib "gdi32" Alias "GetROP2" (ByVal hdc As Long) As Long
  4435. Declare Function GetAspectRatioFilterEx Lib "gdi32" Alias "GetAspectRatioFilterEx" (ByVal hdc As Long, lpAspectRatio As SIZE) As Long
  4436. Declare Function GetBkColor Lib "gdi32" Alias "GetBkColor" (ByVal hdc As Long) As Long
  4437. Declare Function GetBkMode Lib "gdi32" Alias "GetBkMode" (ByVal hdc As Long) As Long
  4438. Declare Function GetBitmapBits Lib "gdi32" Alias "GetBitmapBits" (ByVal hBitmap As Long, ByVal dwCount As Long, lpBits As Any) As Long
  4439. Declare Function GetBitmapDimensionEx Lib "gdi32" Alias "GetBitmapDimensionEx" (ByVal hBitmap As Long, lpDimension As SIZE) As Long
  4440. Declare Function GetBoundsRect Lib "gdi32" Alias "GetBoundsRect" (ByVal hdc As Long, lprcBounds As RECT, ByVal flags As Long) As Long
  4441.  
  4442. Declare Function GetCharWidth Lib "gdi32" Alias "GetCharWidthA" (ByVal hdc As Long, ByVal wFirstChar As Long, ByVal wLastChar As Long, lpBuffer As Long) As Long
  4443.  
  4444. Declare Function GetCharWidth32 Lib "gdi32" Alias "GetCharWidth32A" (ByVal hdc As Long, ByVal iFirstChar As Long, ByVal iLastChar As Long, lpBuffer As Long) As Long
  4445. Declare Function GetCharWidthFloat Lib "gdi32" Alias "GetCharWidthFloatA" (ByVal hdc As Long, ByVal iFirstChar As Long, ByVal iLastChar As Long, pxBuffer As Double) As Long
  4446.  
  4447. Declare Function GetCharABCWidths Lib "gdi32" Alias "GetCharABCWidthsA" (ByVal hdc As Long, ByVal uFirstChar As Long, ByVal uLastChar As Long, lpabc As ABC) As Long
  4448. Declare Function GetCharABCWidthsFloat Lib "gdi32" Alias "GetCharABCWidthsFloatA" (ByVal hdc As Long, ByVal iFirstChar As Long, ByVal iLastChar As Long, lpABCF As ABCFLOAT) As Long
  4449.  
  4450. Declare Function GetClipBox Lib "gdi32" Alias "GetClipBox" (ByVal hdc As Long, lpRect As RECT) As Long
  4451. Declare Function GetClipRgn Lib "gdi32" Alias "GetClipRgn" (ByVal hdc As Long, ByVal hRgn As Long) As Long
  4452. Declare Function GetMetaRgn Lib "gdi32" Alias "GetMetaRgn" (ByVal hdc As Long, ByVal hRgn As Long) As Long
  4453. Declare Function GetCurrentObject Lib "gdi32" Alias "GetCurrentObject" (ByVal hdc As Long, ByVal uObjectType As Long) As Long
  4454. Declare Function GetCurrentPositionEx Lib "gdi32" Alias "GetCurrentPositionEx" (ByVal hdc As Long, lpPoint As POINTAPI) As Long
  4455. Declare Function GetDeviceCaps Lib "gdi32" Alias "GetDeviceCaps" (ByVal hdc As Long, ByVal nIndex As Long) As Long
  4456. Declare Function GetDIBits Lib "gdi32" Alias "GetDIBits" (ByVal aHDC As Long, ByVal hBitmap As Long, ByVal nStartScan As Long, ByVal nNumScans As Long, lpBits As Any, lpBI As BITMAPINFO, ByVal wUsage As Long) As Long
  4457. Declare Function GetFontData Lib "gdi32" Alias "GetFontDataA" (ByVal hdc As Long, ByVal dwTable As Long, ByVal dwOffset As Long, lpvBuffer As Any, ByVal cbData As Long) As Long
  4458. Declare Function GetGlyphOutline Lib "gdi32" Alias "GetGlyphOutlineA" (ByVal hdc As Long, ByVal uChar As Long, ByVal fuFormat As Long, lpgm As GLYPHMETRICS, ByVal cbBuffer As Long, lpBuffer As Any, lpmat2 As MAT2) As Long
  4459. Declare Function GetGraphicsMode Lib "gdi32" Alias "GetGraphicsMode" (ByVal hdc As Long) As Long
  4460. Declare Function GetMapMode Lib "gdi32" Alias "GetMapMode" (ByVal hdc As Long) As Long
  4461. Declare Function GetMetaFileBitsEx Lib "gdi32" Alias "GetMetaFileBitsEx" (ByVal hMF As Long, ByVal nSize As Long, lpvData As Any) As Long
  4462. Declare Function GetMetaFile Lib "gdi32" Alias "GetMetaFileA" (ByVal lpFileName As String) As Long
  4463. Declare Function GetNearestColor Lib "gdi32" Alias "GetNearestColor" (ByVal hdc As Long, ByVal crColor As Long) As Long
  4464. Declare Function GetNearestPaletteIndex Lib "gdi32" Alias "GetNearestPaletteIndex" (ByVal hPalette As Long, ByVal crColor As Long) As Long
  4465. Declare Function GetObjectType Lib "gdi32" Alias "GetObjectType" (ByVal hgdiobj As Long) As Long
  4466.  
  4467. Declare Function GetOutlineTextMetrics Lib "gdi32" Alias "GetOutlineTextMetricsA" (ByVal hdc As Long, ByVal cbData As Long, lpotm As OUTLINETEXTMETRIC) As Long
  4468.  
  4469. Declare Function GetPaletteEntries Lib "gdi32" Alias "GetPaletteEntries" (ByVal hPalette As Long, ByVal wStartIndex As Long, ByVal wNumEntries As Long, lpPaletteEntries As PALETTEENTRY) As Long
  4470. Declare Function GetPixel Lib "gdi32" Alias "GetPixel" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long) As Long
  4471. Declare Function GetPolyFillMode Lib "gdi32" Alias "GetPolyFillMode" (ByVal hdc As Long) As Long
  4472. Declare Function GetRasterizerCaps Lib "gdi32" Alias "GetRasterizerCaps" (lpraststat As RASTERIZER_STATUS, ByVal cb As Long) As Long
  4473. Declare Function GetRegionData Lib "gdi32" Alias "GetRegionDataA" (ByVal hRgn As Long, ByVal dwCount As Long, lpRgnData As RgnData) As Long
  4474. Declare Function GetRgnBox Lib "gdi32" Alias "GetRgnBox" (ByVal hRgn As Long, lpRect As RECT) As Long
  4475. Declare Function GetStockObject Lib "gdi32" Alias "GetStockObject" (ByVal nIndex As Long) As Long
  4476. Declare Function GetStretchBltMode Lib "gdi32" Alias "GetStretchBltMode" (ByVal hdc As Long) As Long
  4477. Declare Function GetSystemPaletteEntries Lib "gdi32" Alias "GetSystemPaletteEntries" (ByVal hdc As Long, ByVal wStartIndex As Long, ByVal wNumEntries As Long, lpPaletteEntries As PALETTEENTRY) As Long
  4478. Declare Function GetSystemPaletteUse Lib "gdi32" Alias "GetSystemPaletteUse" (ByVal hdc As Long) As Long
  4479. Declare Function GetTextCharacterExtra Lib "gdi32" (ByVal hdc As Long) As Long
  4480. Declare Function GetTextAlign Lib "gdi32" Alias "GetTextAlign" (ByVal hdc As Long) As Long
  4481. Declare Function GetTextColor Lib "gdi32" Alias "GetTextColor" (ByVal hdc As Long) As Long
  4482.  
  4483. Declare Function GetTextExtentPoint Lib "gdi32" Alias "GetTextExtentPointA" (ByVal hdc As Long, ByVal lpszString As String, ByVal cbString As Long, lpSize As SIZE) As Long
  4484. Declare Function GetTextExtentPoint32 Lib "gdi32" Alias "GetTextExtentPoint32A" (ByVal hdc As Long, ByVal lpsz As String, ByVal cbString As Long, lpSize As SIZE) As Long
  4485. Declare Function GetTextExtentExPoint Lib "gdi32" Alias "GetTextExtentExPointA" (ByVal hdc As Long, ByVal lpszStr As String, ByVal cchString As Long, ByVal nMaxExtent As Long, lpnFit As Long, alpDx As Long, lpSize As SIZE) As Long
  4486.  
  4487. Declare Function GetViewportExtEx Lib "gdi32" Alias "GetViewportExtEx" (ByVal hdc As Long, lpSize As SIZE) As Long
  4488. Declare Function GetViewportOrgEx Lib "gdi32" Alias "GetViewportOrgEx" (ByVal hdc As Long, lpPoint As POINTAPI) As Long
  4489. Declare Function GetWindowExtEx Lib "gdi32" Alias "GetWindowExtEx" (ByVal hdc As Long, lpSize As SIZE) As Long
  4490. Declare Function GetWindowOrgEx Lib "gdi32" Alias "GetWindowOrgEx" (ByVal hdc As Long, lpPoint As POINTAPI) As Long
  4491.  
  4492. Declare Function IntersectClipRect Lib "gdi32" Alias "IntersectClipRect" (ByVal hdc As Long, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
  4493. Declare Function InvertRgn Lib "gdi32" Alias "InvertRgn" (ByVal hdc As Long, ByVal hRgn As Long) As Long
  4494. Declare Function LineTo Lib "gdi32" Alias "LineTo" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long) As Long
  4495. Declare Function MaskBlt Lib "gdi32" Alias "MaskBlt" (ByVal hdcDest As Long, ByVal nXDest As Long, ByVal nYDest As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hdcSrc As Long, ByVal nXSrc As Long, ByVal nYSrc As Long, ByVal hbmMask As Long, ByVal xMask As Long, ByVal yMask As Long, ByVal dwRop As Long) As Long
  4496. Declare Function PlgBlt Lib "gdi32" Alias "PlgBlt" (ByVal hdcDest As Long, lpPoint As POINTAPI, ByVal hdcSrc As Long, ByVal nXSrc As Long, ByVal nYSrc As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hbmMask As Long, ByVal xMask As Long, ByVal yMask As Long) As Long
  4497.  
  4498. Declare Function OffsetClipRgn Lib "gdi32" Alias "OffsetClipRgn" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long) As Long
  4499. Declare Function OffsetRgn Lib "gdi32" Alias "OffsetRgn" (ByVal hRgn As Long, ByVal x As Long, ByVal y As Long) As Long
  4500. Declare Function PatBlt Lib "gdi32" Alias "PatBlt" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal dwRop As Long) As Long
  4501. Declare Function Pie Lib "gdi32" Alias "Pie" (ByVal hdc As Long, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long, ByVal X3 As Long, ByVal Y3 As Long, ByVal X4 As Long, ByVal Y4 As Long) As Long
  4502. Declare Function PlayMetaFile Lib "gdi32" Alias "PlayMetaFile" (ByVal hdc As Long, ByVal hMF As Long) As Long
  4503. Declare Function PaintRgn Lib "gdi32" Alias "PaintRgn" (ByVal hdc As Long, ByVal hRgn As Long) As Long
  4504. Declare Function PolyPolygon Lib "gdi32" Alias "PolyPolygon" (ByVal hdc As Long, lpPoint As POINTAPI, lpPolyCounts As Long, ByVal nCount As Long) As Long
  4505. Declare Function PtInRegion Lib "gdi32" Alias "PtInRegion" (ByVal hRgn As Long, ByVal x As Long, ByVal y As Long) As Long
  4506. Declare Function PtVisible Lib "gdi32" Alias "PtVisible" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long) As Long
  4507. Declare Function RectVisible Lib "gdi32" Alias "RectVisible" (ByVal hdc As Long, lpRect As RECT) As Long
  4508. Declare Function RectInRegion Lib "gdi32" Alias "RectInRegion" (ByVal hRgn As Long, lpRect As RECT) As Long
  4509. Declare Function Rectangle Lib "gdi32" Alias "Rectangle" (ByVal hdc As Long, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
  4510. Declare Function RestoreDC Lib "gdi32" Alias "RestoreDC" (ByVal hdc As Long, ByVal nSavedDC As Long) As Long
  4511. Declare Function ResetDC Lib "gdi32" Alias "ResetDCA" (ByVal hdc As Long, lpInitData As DEVMODE) As Long
  4512. Declare Function RealizePalette Lib "gdi32" Alias "RealizePalette" (ByVal hdc As Long) As Long
  4513. Declare Function RemoveFontResource Lib "gdi32" Alias "RemoveFontResourceA" (ByVal lpFileName As String) As Long
  4514. Declare Function RoundRect Lib "gdi32" Alias "RoundRect" (ByVal hdc As Long, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long, ByVal X3 As Long, ByVal Y3 As Long) As Long
  4515. Declare Function ResizePalette Lib "gdi32" Alias "ResizePalette" (ByVal hPalette As Long, ByVal nNumEntries As Long) As Long
  4516.  
  4517. Declare Function SaveDC Lib "gdi32" Alias "SaveDC" (ByVal hdc As Long) As Long
  4518. Declare Function SelectClipRgn Lib "gdi32" Alias "SelectClipRgn" (ByVal hdc As Long, ByVal hRgn As Long) As Long
  4519. Declare Function ExtSelectClipRgn Lib "gdi32" Alias "ExtSelectClipRgn" (ByVal hdc As Long, ByVal hRgn As Long, ByVal fnMode As Long) As Long
  4520. Declare Function SetMetaRgn Lib "gdi32" Alias "SetMetaRgn" (ByVal hdc As Long) As Long
  4521. Declare Function SelectObject Lib "gdi32" Alias "SelectObject" (ByVal hdc As Long, ByVal hObject As Long) As Long
  4522. Declare Function SelectPalette Lib "gdi32" Alias "SelectPalette" (ByVal hdc As Long, ByVal hPalette As Long, ByVal bForceBackground As Long) As Long
  4523. Declare Function SetBkColor Lib "gdi32" Alias "SetBkColor" (ByVal hdc As Long, ByVal crColor As Long) As Long
  4524. Declare Function SetBkMode Lib "gdi32" Alias "SetBkMode" (ByVal hdc As Long, ByVal nBkMode As Long) As Long
  4525. Declare Function SetBitmapBits Lib "gdi32" Alias "SetBitmapBits" (ByVal hBitmap As Long, ByVal dwCount As Long, lpBits As Any) As Long
  4526.  
  4527. Declare Function SetBoundsRect Lib "gdi32" Alias "SetBoundsRect" (ByVal hdc As Long, lprcBounds As RECT, ByVal flags As Long) As Long
  4528. Declare Function SetDIBits Lib "gdi32" Alias "SetDIBits" (ByVal hdc As Long, ByVal hBitmap As Long, ByVal nStartScan As Long, ByVal nNumScans As Long, lpBits As Any, lpBI As BITMAPINFO, ByVal wUsage As Long) As Long
  4529. Declare Function SetDIBitsToDevice Lib "gdi32" Alias "SetDIBitsToDevice" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal dx As Long, ByVal dy As Long, ByVal SrcX As Long, ByVal SrcY As Long, ByVal Scan As Long, ByVal NumScans As Long, Bits As Any, BitsInfo As BITMAPINFO, ByVal wUsage As Long) As Long
  4530. Declare Function SetMapperFlags Lib "gdi32" Alias "SetMapperFlags" (ByVal hdc As Long, ByVal dwFlag As Long) As Long
  4531. Declare Function SetGraphicsMode Lib "gdi32" Alias "SetGraphicsMode" (ByVal hdc As Long, ByVal iMode As Long) As Long
  4532. Declare Function SetMapMode Lib "gdi32" Alias "SetMapMode" (ByVal hdc As Long, ByVal nMapMode As Long) As Long
  4533. Declare Function SetMetaFileBitsEx Lib "gdi32" Alias "SetMetaFileBitsEx" (ByVal nSize As Long, lpData As Byte) As Long
  4534. Declare Function SetPaletteEntries Lib "gdi32" Alias "SetPaletteEntries" (ByVal hPalette As Long, ByVal wStartIndex As Long, ByVal wNumEntries As Long, lpPaletteEntries As PALETTEENTRY) As Long
  4535. Declare Function SetPixel Lib "gdi32" Alias "SetPixel" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal crColor As Long) As Long
  4536. Declare Function SetPixelV Lib "gdi32" Alias "SetPixelV" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal crColor As Long) As Long
  4537. Declare Function SetPolyFillMode Lib "gdi32" Alias "SetPolyFillMode" (ByVal hdc As Long, ByVal nPolyFillMode As Long) As Long
  4538. Declare Function StretchBlt Lib "gdi32" Alias "StretchBlt" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal nSrcWidth As Long, ByVal nSrcHeight As Long, ByVal dwRop As Long) As Long
  4539. Declare Function SetRectRgn Lib "gdi32" Alias "SetRectRgn" (ByVal hRgn As Long, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
  4540. Declare Function StretchDIBits Lib "gdi32" Alias "StretchDIBits" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal dx As Long, ByVal dy As Long, ByVal SrcX As Long, ByVal SrcY As Long, ByVal wSrcWidth As Long, ByVal wSrcHeight As Long, lpBits As Any, lpBitsInfo As BITMAPINFO, ByVal wUsage As Long, ByVal dwRop As Long) As Long
  4541. Declare Function SetROP2 Lib "gdi32" Alias "SetROP2" (ByVal hdc As Long, ByVal nDrawMode As Long) As Long
  4542. Declare Function SetStretchBltMode Lib "gdi32" Alias "SetStretchBltMode" (ByVal hdc As Long, ByVal nStretchMode As Long) As Long
  4543. Declare Function SetSystemPaletteUse Lib "gdi32" Alias "SetSystemPaletteUse" (ByVal hdc As Long, ByVal wUsage As Long) As Long
  4544. Declare Function SetTextCharacterExtra Lib "gdi32" Alias "SetTextCharacterExtraA" (ByVal hdc As Long, ByVal nCharExtra As Long) As Long
  4545. Declare Function SetTextColor Lib "gdi32" Alias "SetTextColor" (ByVal hdc As Long, ByVal crColor As Long) As Long
  4546. Declare Function SetTextAlign Lib "gdi32" Alias "SetTextAlign" (ByVal hdc As Long, ByVal wFlags As Long) As Long
  4547. Declare Function SetTextJustification Lib "gdi32" Alias "SetTextJustification" (ByVal hdc As Long, ByVal nBreakExtra As Long, ByVal nBreakCount As Long) As Long
  4548. Declare Function UpdateColors Lib "gdi32" Alias "UpdateColors" (ByVal hdc As Long) As Long
  4549.  
  4550. Declare Function GetProcAddress Lib "kernel32" Alias "GetProcAddress" (ByVal hModule As Long, ByVal lpProcName As String) As Long
  4551.  
  4552. Declare Function PlayMetaFileRecord Lib "gdi32" Alias "PlayMetaFileRecord" (ByVal hdc As Long, lpHandletable As HANDLETABLE, lpMetaRecord As METARECORD, ByVal nHandles As Long) As Long
  4553.  
  4554. Declare Function CloseEnhMetaFile Lib "gdi32" Alias "CloseEnhMetaFile" (ByVal hdc As Long) As Long
  4555. Declare Function CopyEnhMetaFile Lib "gdi32" Alias "CopyEnhMetaFileA" (ByVal hemfSrc As Long, ByVal lpszFile As String) As Long
  4556. Declare Function CreateEnhMetaFile Lib "gdi32" Alias "CreateEnhMetaFileA" (ByVal hdcRef As Long, ByVal lpFileName As String, lpRect As RECT, ByVal lpDescription As String) As Long
  4557. Declare Function DeleteEnhMetaFile Lib "gdi32" Alias "DeleteEnhMetaFile" (ByVal hemf As Long) As Long
  4558. Declare Function EnumEnhMetaFile Lib "gdi32" Alias "EnumEnhMetaFile" (ByVal hdc As Long, ByVal hemf As Long, ByVal lpEnhMetaFunc As Long, lpData As Any, lpRect As RECT) As Long
  4559. Declare Function GetEnhMetaFile Lib "gdi32" Alias "GetEnhMetaFileA" (ByVal lpszMetaFile As String) As Long
  4560. Declare Function GetEnhMetaFileBits Lib "gdi32" Alias "GetEnhMetaFileBits" (ByVal hemf As Long, ByVal cbBuffer As Long, lpbBuffer As Byte) As Long
  4561. Declare Function GetEnhMetaFileDescription Lib "gdi32" Alias "GetEnhMetaFileDescriptionA" (ByVal hemf As Long, ByVal cchBuffer As Long, ByVal lpszDescription As String) As Long
  4562. Declare Function GetEnhMetaFileHeader Lib "gdi32" Alias "GetEnhMetaFileHeader" (ByVal hemf As Long, ByVal cbBuffer As Long, lpemh As ENHMETAHEADER) As Long
  4563. Declare Function GetEnhMetaFilePaletteEntries Lib "gdi32" Alias "GetEnhMetaFilePaletteEntries" (ByVal hemf As Long, ByVal cEntries As Long, lppe As PALETTEENTRY) As Long
  4564. Declare Function GetWinMetaFileBits Lib "gdi32" Alias "GetWinMetaFileBits" (ByVal hemf As Long, ByVal cbBuffer As Long, lpbBuffer As Byte, ByVal fnMapMode As Long, ByVal hdcRef As Long) As Long
  4565. Declare Function PlayEnhMetaFile Lib "gdi32" Alias "PlayEnhMetaFile" (ByVal hdc As Long, ByVal hemf As Long, lpRect As RECT) As Long
  4566. Declare Function PlayEnhMetaFileRecord Lib "gdi32" Alias "PlayEnhMetaFileRecord" (ByVal hdc As Long, lpHandletable As HANDLETABLE, lpEnhMetaRecord As ENHMETARECORD, ByVal nHandles As Long) As Long
  4567. Declare Function SetEnhMetaFileBits Lib "gdi32" Alias "SetEnhMetaFileBits" (ByVal cbBuffer As Long, lpData As Byte) As Long
  4568. Declare Function SetWinMetaFileBits Lib "gdi32" Alias "SetWinMetaFileBits" (ByVal cbBuffer As Long, lpbBuffer As Byte, ByVal hdcRef As Long, lpmfp As METAFILEPICT) As Long
  4569. Declare Function GdiComment Lib "gdi32" Alias "GdiComment" (ByVal hdc As Long, ByVal cbSize As Long, lpData As Byte) As Long
  4570.  
  4571. Declare Function GetTextMetrics Lib "gdi32" Alias "GetTextMetricsA" (ByVal hdc As Long, lpMetrics As TEXTMETRIC) As Long
  4572.  
  4573. Declare Function AngleArc Lib "gdi32" Alias "AngleArc" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal dwRadius As Long, ByVal eStartAngle As Double, ByVal eSweepAngle As Double) As Long
  4574. Declare Function PolyPolyline Lib "gdi32" Alias "PolyPolyline" (ByVal hdc As Long, lppt As POINTAPI, lpdwPolyPoints As Long, ByVal cCount As Long) As Long
  4575. Declare Function GetWorldTransform Lib "gdi32" Alias "GetWorldTransform" (ByVal hdc As Long, lpXform As xform) As Long
  4576. Declare Function SetWorldTransform Lib "gdi32" Alias "SetWorldTransform" (ByVal hdc As Long, lpXform As xform) As Long
  4577. Declare Function ModifyWorldTransform Lib "gdi32" Alias "ModifyWorldTransform" (ByVal hdc As Long, lpXform As xform, ByVal iMode As Long) As Long
  4578. Declare Function CombineTransform Lib "gdi32" Alias "CombineTransform" (lpxformResult As xform, lpxform1 As xform, lpxform2 As xform) As Long
  4579.  
  4580. '  Flags value for COLORADJUSTMENT
  4581. Const CA_NEGATIVE = &H1
  4582. Const CA_LOG_FILTER = &H2
  4583.  
  4584. '  IlluminantIndex values
  4585. Const ILLUMINANT_DEVICE_DEFAULT = 0
  4586. Const ILLUMINANT_A = 1
  4587. Const ILLUMINANT_B = 2
  4588. Const ILLUMINANT_C = 3
  4589. Const ILLUMINANT_D50 = 4
  4590. Const ILLUMINANT_D55 = 5
  4591. Const ILLUMINANT_D65 = 6
  4592. Const ILLUMINANT_D75 = 7
  4593. Const ILLUMINANT_F2 = 8
  4594. Const ILLUMINANT_MAX_INDEX = ILLUMINANT_F2
  4595.  
  4596. Const ILLUMINANT_TUNGSTEN = ILLUMINANT_A
  4597. Const ILLUMINANT_DAYLIGHT = ILLUMINANT_C
  4598. Const ILLUMINANT_FLUORESCENT = ILLUMINANT_F2
  4599. Const ILLUMINANT_NTSC = ILLUMINANT_C
  4600.  
  4601. '  Min and max for RedGamma, GreenGamma, BlueGamma
  4602. Const RGB_GAMMA_MIN = 2500 'words
  4603. Const RGB_GAMMA_MAX = 65000
  4604.  
  4605. '  Min and max for ReferenceBlack and ReferenceWhite
  4606. Const REFERENCE_WHITE_MIN = 6000 'words
  4607. Const REFERENCE_WHITE_MAX = 10000
  4608. Const REFERENCE_BLACK_MIN = 0
  4609. Const REFERENCE_BLACK_MAX = 4000
  4610.  
  4611. '  Min and max for Contrast, Brightness, Colorfulness, RedGreenTint
  4612. Const COLOR_ADJ_MIN = -100 'shorts
  4613. Const COLOR_ADJ_MAX = 100
  4614.  
  4615. Type COLORADJUSTMENT
  4616.         caSize As Integer
  4617.         caFlags As Integer
  4618.         caIlluminantIndex As Integer
  4619.         caRedGamma As Integer
  4620.         caGreenGamma As Integer
  4621.         caBlueGamma As Integer
  4622.         caReferenceBlack As Integer
  4623.         caReferenceWhite As Integer
  4624.         caContrast As Integer
  4625.         caBrightness As Integer
  4626.         caColorfulness As Integer
  4627.         caRedGreenTint As Integer
  4628. End Type
  4629.  
  4630. Declare Function SetColorAdjustment Lib "gdi32" Alias "SetColorAdjustment" (ByVal hdc As Long, lpca As COLORADJUSTMENT) As Long
  4631. Declare Function GetColorAdjustment Lib "gdi32" Alias "GetColorAdjustment" (ByVal hdc As Long, lpca As COLORADJUSTMENT) As Long
  4632. Declare Function CreateHalftonePalette Lib "gdi32" Alias "CreateHalftonePalette" (ByVal hdc As Long) As Long
  4633.  
  4634. Type DOCINFO
  4635.         cbSize As Long
  4636.         lpszDocName As String
  4637.         lpszOutput As String
  4638. End Type
  4639.  
  4640. Declare Function StartDoc Lib "gdi32" Alias "StartDocA" (ByVal hdc As Long, lpdi As DOCINFO) As Long
  4641. Declare Function StartPage Lib "gdi32" Alias "StartPage" (ByVal hdc As Long) As Long
  4642. Declare Function EndPage Lib "gdi32" Alias "EndPage" (ByVal hdc As Long) As Long
  4643. Declare Function EndDoc Lib "gdi32" Alias "EndDoc" (ByVal hdc As Long) As Long
  4644. Declare Function AbortDoc Lib "gdi32" Alias "AbortDoc" (ByVal hdc As Long) As Long
  4645.  
  4646. Declare Function AbortPath Lib "gdi32" Alias "AbortPath" (ByVal hdc As Long) As Long
  4647. Declare Function ArcTo Lib "gdi32" Alias "ArcTo" (ByVal hdc As Long, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long, ByVal X3 As Long, ByVal Y3 As Long, ByVal X4 As Long, ByVal Y4 As Long) As Long
  4648. Declare Function BeginPath Lib "gdi32" Alias "BeginPath" (ByVal hdc As Long) As Long
  4649. Declare Function CloseFigure Lib "gdi32" Alias "CloseFigure" (ByVal hdc As Long) As Long
  4650. Declare Function EndPath Lib "gdi32" Alias "EndPath" (ByVal hdc As Long) As Long
  4651. Declare Function FillPath Lib "gdi32" Alias "FillPath" (ByVal hdc As Long) As Long
  4652. Declare Function FlattenPath Lib "gdi32" Alias "FlattenPath" (ByVal hdc As Long) As Long
  4653. Declare Function GetPath Lib "gdi32" Alias "GetPath" (ByVal hdc As Long, lpPoint As POINTAPI, lpTypes As Byte, ByVal nSize As Long) As Long
  4654. Declare Function PathToRegion Lib "gdi32" Alias "PathToRegion" (ByVal hdc As Long) As Long
  4655. Declare Function PolyDraw Lib "gdi32" Alias "PolyDraw" (ByVal hdc As Long, lppt As POINTAPI, lpbTypes As Byte, ByVal cCount As Long) As Long
  4656. Declare Function SelectClipPath Lib "gdi32" Alias "SelectClipPath" (ByVal hdc As Long, ByVal iMode As Long) As Long
  4657. Declare Function SetArcDirection Lib "gdi32" Alias "SetArcDirection" (ByVal hdc As Long, ByVal ArcDirection As Long) As Long
  4658. Declare Function SetMiterLimit Lib "gdi32" Alias "SetMiterLimit" (ByVal hdc As Long, ByVal eNewLimit As Double, peOldLimit As Double) As Long
  4659. Declare Function StrokeAndFillPath Lib "gdi32" Alias "StrokeAndFillPath" (ByVal hdc As Long) As Long
  4660. Declare Function StrokePath Lib "gdi32" Alias "StrokePath" (ByVal hdc As Long) As Long
  4661. Declare Function WidenPath Lib "gdi32" Alias "WidenPath" (ByVal hdc As Long) As Long
  4662. Declare Function ExtCreatePen Lib "gdi32" Alias "ExtCreatePen" (ByVal dwPenStyle As Long, ByVal dwWidth As Long, lplb As LOGBRUSH, ByVal dwStyleCount As Long, lpStyle As Long) As Long
  4663. Declare Function GetMiterLimit Lib "gdi32" Alias "GetMiterLimit" (ByVal hdc As Long, peLimit As Double) As Long
  4664. Declare Function GetArcDirection Lib "gdi32" Alias "GetArcDirection" (ByVal hdc As Long) As Long
  4665.  
  4666. Declare Function GetObject Lib "gdi32" Alias "GetObjectA" (ByVal hObject As Long, ByVal nCount As Long, lpObject As Any) As Long
  4667. Declare Function MoveToEx Lib "gdi32" Alias "MoveToEx" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, lpPoint As POINTAPI) As Long
  4668. Declare Function TextOut Lib "gdi32" Alias "TextOutA" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal lpString As String, ByVal nCount As Long) As Long
  4669. Declare Function ExtTextOut Lib "gdi32" Alias "ExtTextOutA" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal wOptions As Long, lpRect As Rect, ByVal lpString As String, ByVal nCount As Long, lpDx As Long) As Long
  4670. Declare Function PolyTextOut Lib "gdi32" Alias "PolyTextOutA" (ByVal hdc As Long, pptxt As POLYTEXT, cStrings As Long) As Long
  4671.  
  4672. Declare Function CreatePolygonRgn Lib "gdi32" Alias "CreatePolygonRgn" (lpPoint As POINTAPI, ByVal nCount As Long, ByVal nPolyFillMode As Long) As Long
  4673. Declare Function DPtoLP Lib "gdi32" Alias "DPtoLP" (ByVal hdc As Long, lpPoint As POINTAPI, ByVal nCount As Long) As Long
  4674. Declare Function LPtoDP Lib "gdi32" Alias "LPtoDP" (ByVal hdc As Long, lpPoint As POINTAPI, ByVal nCount As Long) As Long
  4675. Declare Function Polyline Lib "gdi32" Alias "Polyline" (ByVal hdc As Long, lpPoint As POINTAPI, ByVal nCount As Long) As Long
  4676. Declare Function Polygon Lib "gdi32" Alias "Polygon" (ByVal hdc As Long, lpPoint As POINTAPI, ByVal nCount As Long) As Long
  4677.  
  4678. Declare Function PolyBezier Lib "gdi32" Alias "PolyBezier" (ByVal hdc As Long, lppt As POINTAPI, ByVal cPoints As Long) As Long
  4679. Declare Function PolyBezierTo Lib "gdi32" Alias "PolyBezierTo" (ByVal hdc As Long, lppt As POINTAPI, ByVal cCount As Long) As Long
  4680. Declare Function PolylineTo Lib "gdi32" Alias "PolylineTo" (ByVal hdc As Long, lppt As POINTAPI, ByVal cCount As Long) As Long
  4681.  
  4682. Declare Function SetViewportExtEx Lib "gdi32" Alias "SetViewportExtEx" (ByVal hdc As Long, ByVal nX As Long, ByVal nY As Long, lpSize As SIZE) As Long
  4683. Declare Function SetViewportOrgEx Lib "gdi32" Alias "SetViewportOrgEx" (ByVal hdc As Long, ByVal nX As Long, ByVal nY As Long, lpPoint As POINTAPI) As Long
  4684. Declare Function SetWindowOrgEx Lib "gdi32" Alias "SetWindowOrgEx" (ByVal hdc As Long, ByVal nX As Long, ByVal nY As Long, lpPoint As POINTAPI) As Long
  4685. Declare Function SetWindowExtEx Lib "gdi32" Alias "SetWindowExtEx" (ByVal hdc As Long, ByVal nX As Long, ByVal nY As Long, lpSize As SIZE) As Long
  4686.  
  4687. Declare Function OffsetViewportOrgEx Lib "gdi32" Alias "OffsetViewportOrgEx" (ByVal hdc As Long, ByVal nX As Long, ByVal nY As Long, lpPoint As POINTAPI) As Long
  4688. Declare Function OffsetWindowOrgEx Lib "gdi32" Alias "OffsetWindowOrgEx" (ByVal hdc As Long, ByVal nX As Long, ByVal nY As Long, lpPoint As POINTAPI) As Long
  4689. Declare Function ScaleWindowExtEx Lib "gdi32" Alias "ScaleWindowExtEx" (ByVal hdc As Long, ByVal nXnum As Long, ByVal nXdenom As Long, ByVal nYnum As Long, ByVal nYdenom As Long, lpSize As SIZE) As Long
  4690. Declare Function ScaleViewportExtEx Lib "gdi32" Alias "ScaleViewportExtEx" (ByVal hdc As Long, ByVal nXnum As Long, ByVal nXdenom As Long, ByVal nYnum As Long, ByVal nYdenom As Long, lpSize As SIZE) As Long
  4691. Declare Function SetBitmapDimensionEx Lib "gdi32" Alias "SetBitmapDimensionEx" (ByVal hbm As Long, ByVal nX As Long, ByVal nY As Long, lpSize As SIZE) As Long
  4692. Declare Function SetBrushOrgEx Lib "gdi32" Alias "SetBrushOrgEx" (ByVal hdc As Long, ByVal nXOrg As Long, ByVal nYOrg As Long, lppt As POINTAPI) As Long
  4693.  
  4694. Declare Function GetTextFace Lib "gdi32" Alias "GetTextFaceA" (ByVal hdc As Long, ByVal nCount As Long, ByVal lpFacename As String) As Long
  4695.  
  4696. Const FONTMAPPER_MAX = 10
  4697.  
  4698. Type KERNINGPAIR
  4699.         wFirst As Integer
  4700.         wSecond As Integer
  4701.         iKernAmount As Long
  4702. End Type
  4703.  
  4704. Declare Function GetKerningPairs Lib "gdi32" Alias "GetKerningPairsA" (ByVal hdc As Long, ByVal cPairs As Long, lpkrnpair As KERNINGPAIR) As Long
  4705.  
  4706. Declare Function GetDCOrgEx Lib "gdi32" Alias "GetDCOrgEx" (ByVal hdc As Long, lpPoint As POINTAPI) As Long
  4707. Declare Function UnrealizeObject Lib "gdi32" Alias "UnrealizeObject" (ByVal hObject As Long) As Long
  4708.  
  4709. Declare Function GdiFlush Lib "gdi32" Alias "GdiFlush" () As Long
  4710. Declare Function GdiSetBatchLimit Lib "gdi32" Alias "GdiSetBatchLimit" (ByVal dwLimit As Long) As Long
  4711. Declare Function GdiGetBatchLimit Lib "gdi32" Alias "GdiGetBatchLimit" () As Long
  4712.  
  4713. ' Enhanced metafile constants
  4714.  
  4715. Const ENHMETA_SIGNATURE = &H464D4520
  4716.  
  4717. '  Stock object flag used in the object handle
  4718. ' index in the enhanced metafile records.
  4719. '  E.g. The object handle index (META_STOCK_OBJECT Or BLACK_BRUSH)
  4720. '  represents the stock object BLACK_BRUSH.
  4721.  
  4722. Const ENHMETA_STOCK_OBJECT = &H80000000
  4723.  
  4724. '  Enhanced metafile record types.
  4725.  
  4726. Const EMR_HEADER = 1
  4727. Const EMR_POLYBEZIER = 2
  4728. Const EMR_POLYGON = 3
  4729. Const EMR_POLYLINE = 4
  4730. Const EMR_POLYBEZIERTO = 5
  4731. Const EMR_POLYLINETO = 6
  4732. Const EMR_POLYPOLYLINE = 7
  4733. Const EMR_POLYPOLYGON = 8
  4734. Const EMR_SETWINDOWEXTEX = 9
  4735. Const EMR_SETWINDOWORGEX = 10
  4736. Const EMR_SETVIEWPORTEXTEX = 11
  4737. Const EMR_SETVIEWPORTORGEX = 12
  4738. Const EMR_SETBRUSHORGEX = 13
  4739. Const EMR_EOF = 14
  4740. Const EMR_SETPIXELV = 15
  4741. Const EMR_SETMAPPERFLAGS = 16
  4742. Const EMR_SETMAPMODE = 17
  4743. Const EMR_SETBKMODE = 18
  4744. Const EMR_SETPOLYFILLMODE = 19
  4745. Const EMR_SETROP2 = 20
  4746. Const EMR_SETSTRETCHBLTMODE = 21
  4747. Const EMR_SETTEXTALIGN = 22
  4748. Const EMR_SETCOLORADJUSTMENT = 23
  4749. Const EMR_SETTEXTCOLOR = 24
  4750. Const EMR_SETBKCOLOR = 25
  4751. Const EMR_OFFSETCLIPRGN = 26
  4752. Const EMR_MOVETOEX = 27
  4753. Const EMR_SETMETARGN = 28
  4754. Const EMR_EXCLUDECLIPRECT = 29
  4755. Const EMR_INTERSECTCLIPRECT = 30
  4756. Const EMR_SCALEVIEWPORTEXTEX = 31
  4757. Const EMR_SCALEWINDOWEXTEX = 32
  4758. Const EMR_SAVEDC = 33
  4759. Const EMR_RESTOREDC = 34
  4760. Const EMR_SETWORLDTRANSFORM = 35
  4761. Const EMR_MODIFYWORLDTRANSFORM = 36
  4762. Const EMR_SELECTOBJECT = 37
  4763. Const EMR_CREATEPEN = 38
  4764. Const EMR_CREATEBRUSHINDIRECT = 39
  4765. Const EMR_DELETEOBJECT = 40
  4766. Const EMR_ANGLEARC = 41
  4767. Const EMR_ELLIPSE = 42
  4768. Const EMR_RECTANGLE = 43
  4769. Const EMR_ROUNDRECT = 44
  4770. Const EMR_ARC = 45
  4771. Const EMR_CHORD = 46
  4772. Const EMR_PIE = 47
  4773. Const EMR_SELECTPALETTE = 48
  4774. Const EMR_CREATEPALETTE = 49
  4775. Const EMR_SETPALETTEENTRIES = 50
  4776. Const EMR_RESIZEPALETTE = 51
  4777. Const EMR_REALIZEPALETTE = 52
  4778. Const EMR_EXTFLOODFILL = 53
  4779. Const EMR_LINETO = 54
  4780. Const EMR_ARCTO = 55
  4781. Const EMR_POLYDRAW = 56
  4782. Const EMR_SETARCDIRECTION = 57
  4783. Const EMR_SETMITERLIMIT = 58
  4784. Const EMR_BEGINPATH = 59
  4785. Const EMR_ENDPATH = 60
  4786. Const EMR_CLOSEFIGURE = 61
  4787. Const EMR_FILLPATH = 62
  4788. Const EMR_STROKEANDFILLPATH = 63
  4789. Const EMR_STROKEPATH = 64
  4790. Const EMR_FLATTENPATH = 65
  4791. Const EMR_WIDENPATH = 66
  4792. Const EMR_SELECTCLIPPATH = 67
  4793. Const EMR_ABORTPATH = 68
  4794.  
  4795. Const EMR_GDICOMMENT = 70
  4796. Const EMR_FILLRGN = 71
  4797. Const EMR_FRAMERGN = 72
  4798. Const EMR_INVERTRGN = 73
  4799. Const EMR_PAINTRGN = 74
  4800. Const EMR_EXTSELECTCLIPRGN = 75
  4801. Const EMR_BITBLT = 76
  4802. Const EMR_STRETCHBLT = 77
  4803. Const EMR_MASKBLT = 78
  4804. Const EMR_PLGBLT = 79
  4805. Const EMR_SETDIBITSTODEVICE = 80
  4806. Const EMR_STRETCHDIBITS = 81
  4807. Const EMR_EXTCREATEFONTINDIRECTW = 82
  4808. Const EMR_EXTTEXTOUTA = 83
  4809. Const EMR_EXTTEXTOUTW = 84
  4810. Const EMR_POLYBEZIER16 = 85
  4811. Const EMR_POLYGON16 = 86
  4812. Const EMR_POLYLINE16 = 87
  4813. Const EMR_POLYBEZIERTO16 = 88
  4814. Const EMR_POLYLINETO16 = 89
  4815. Const EMR_POLYPOLYLINE16 = 90
  4816. Const EMR_POLYPOLYGON16 = 91
  4817. Const EMR_POLYDRAW16 = 92
  4818. Const EMR_CREATEMONOBRUSH = 93
  4819. Const EMR_CREATEDIBPATTERNBRUSHPT = 94
  4820. Const EMR_EXTCREATEPEN = 95
  4821. Const EMR_POLYTEXTOUTA = 96
  4822. Const EMR_POLYTEXTOUTW = 97
  4823.  
  4824. Const EMR_MIN = 1
  4825. Const EMR_MAX = 97
  4826.  
  4827. Type emr
  4828.         iType As Long
  4829.         nSize As Long
  4830. End Type
  4831.  
  4832. Type emrtext
  4833.         ptlReference As POINTL
  4834.         nchars As Long
  4835.         offString As Long
  4836.         fOptions As Long
  4837.         rcl As RECTL
  4838.         offDx As Long
  4839. End Type
  4840.  
  4841. Type EMRABORTPATH
  4842.         pEmr As emr
  4843. End Type
  4844.  
  4845. Type EMRBEGINPATH
  4846.         pEmr As emr
  4847. End Type
  4848.  
  4849. Type EMRENDPATH
  4850.         pEmr As emr
  4851. End Type
  4852.  
  4853. Type EMRCLOSEFIGURE
  4854.         pEmr As emr
  4855. End Type
  4856.  
  4857. Type EMRFLATTENPATH
  4858.         pEmr As emr
  4859. End Type
  4860.  
  4861. Type EMRWIDENPATH
  4862.         pEmr As emr
  4863. End Type
  4864.  
  4865. Type EMRSETMETARGN
  4866.         pEmr As emr
  4867. End Type
  4868.  
  4869. Type EMREMRSAVEDC
  4870.         pEmr As emr
  4871. End Type
  4872.  
  4873. Type EMRREALIZEPALETTE
  4874.         pEmr As emr
  4875. End Type
  4876.  
  4877. Type EMRSELECTCLIPPATH
  4878.         pEmr As emr
  4879.         iMode As Long
  4880. End Type
  4881.  
  4882. Type EMRSETBKMODE
  4883.         pEmr As emr
  4884.         iMode As Long
  4885. End Type
  4886.  
  4887. Type EMRSETMAPMODE
  4888.         pEmr As emr
  4889.         iMode As Long
  4890. End Type
  4891.  
  4892. Type EMRSETPOLYFILLMODE
  4893.         pEmr As emr
  4894.         iMode As Long
  4895. End Type
  4896.  
  4897. Type EMRSETROP2
  4898.         pEmr As emr
  4899.         iMode As Long
  4900. End Type
  4901.  
  4902. Type EMRSETSTRETCHBLTMODE
  4903.         pEmr As emr
  4904.         iMode As Long
  4905. End Type
  4906.  
  4907. Type EMRSETTEXTALIGN
  4908.         pEmr As emr
  4909.         iMode As Long
  4910. End Type
  4911.  
  4912. Type EMRSETMITERLIMIT
  4913.         pEmr As emr
  4914.         eMiterLimit As Double
  4915. End Type
  4916.  
  4917. Type EMRRESTOREDC
  4918.         pEmr As emr
  4919.         iRelative As Long
  4920. End Type
  4921.  
  4922. Type EMRSETARCDIRECTION
  4923.         pEmr As emr
  4924.         iArcDirection As Long
  4925. End Type
  4926.  
  4927. Type EMRSETMAPPERFLAGS
  4928.         pEmr As emr
  4929.         dwFlags As Long
  4930. End Type
  4931.  
  4932. Type EMRSETTEXTCOLOR
  4933.         pEmr As emr
  4934.         crColor As Long
  4935. End Type
  4936.  
  4937. Type EMRSETBKCOLOR
  4938.         pEmr As emr
  4939.         crColor As Long
  4940. End Type
  4941.  
  4942. Type EMRSELECTOBJECT
  4943.         pEmr As emr
  4944.         ihObject As Long
  4945. End Type
  4946.  
  4947. Type EMRDELETEOBJECT
  4948.         pEmr As emr
  4949.         ihObject As Long
  4950. End Type
  4951.  
  4952. Type EMRSELECTPALETTE
  4953.         pEmr As emr
  4954.         ihPal As Long
  4955. End Type
  4956.  
  4957. Type EMRRESIZEPALETTE
  4958.         pEmr As emr
  4959.         ihPal As Long
  4960.         cEntries As Long
  4961. End Type
  4962.  
  4963. Type EMRSETPALETTEENTRIES
  4964.         pEmr As emr
  4965.         ihPal As Long
  4966.         iStart As Long
  4967.         cEntries As Long
  4968.         aPalEntries(1) As PALETTEENTRY
  4969. End Type
  4970.  
  4971. Type EMRSETCOLORADJUSTMENT
  4972.         pEmr As emr
  4973.         ColorAdjustment As ColorAdjustment
  4974. End Type
  4975.  
  4976. Type EMRGDICOMMENT
  4977.         pEmr As emr
  4978.         cbData As Long
  4979.         Data(1) As Integer
  4980. End Type
  4981.  
  4982. Type EMREOF
  4983.         pEmr As emr
  4984.         nPalEntries As Long
  4985.         offPalEntries As Long
  4986.         nSizeLast As Long
  4987. End Type
  4988.  
  4989. Type EMRLINETO
  4990.         pEmr As emr
  4991.         ptl As POINTL
  4992. End Type
  4993.  
  4994. Type EMRMOVETOEX
  4995.         pEmr As emr
  4996.         ptl As POINTL
  4997. End Type
  4998.  
  4999. Type EMROFFSETCLIPRGN
  5000.         pEmr As emr
  5001.         ptlOffset As POINTL
  5002. End Type
  5003.  
  5004. Type EMRFILLPATH
  5005.         pEmr As emr
  5006.         rclBounds As RECTL
  5007. End Type
  5008.  
  5009. Type EMRSTROKEANDFILLPATH
  5010.         pEmr As emr
  5011.         rclBounds As RECTL
  5012. End Type
  5013.  
  5014. Type EMRSTROKEPATH
  5015.         pEmr As emr
  5016.         rclBounds As RECTL
  5017. End Type
  5018.  
  5019. Type EMREXCLUDECLIPRECT
  5020.         pEmr As emr
  5021.         rclClip As RECTL
  5022. End Type
  5023.  
  5024. Type EMRINTERSECTCLIPRECT
  5025.         pEmr As emr
  5026.         rclClip As RECTL
  5027. End Type
  5028.  
  5029. Type EMRSETVIEWPORTORGEX
  5030.         pEmr As emr
  5031.         ptlOrigin As POINTL
  5032. End Type
  5033.  
  5034. Type EMRSETWINDOWORGEX
  5035.         pEmr As emr
  5036.         ptlOrigin As POINTL
  5037. End Type
  5038.  
  5039. Type EMRSETBRUSHORGEX
  5040.         pEmr As emr
  5041.         ptlOrigin As POINTL
  5042. End Type
  5043.  
  5044. Type EMRSETVIEWPORTEXTEX
  5045.         pEmr As emr
  5046.         szlExtent As SIZEL
  5047. End Type
  5048.  
  5049. Type EMRSETWINDOWEXTEX
  5050.         pEmr As emr
  5051.         szlExtent As SIZEL
  5052. End Type
  5053.  
  5054. Type EMRSCALEVIEWPORTEXTEX
  5055.         pEmr As emr
  5056.         xNum As Long
  5057.         xDenom As Long
  5058.         yNum As Long
  5059.         yDemon As Long
  5060. End Type
  5061.  
  5062. Type EMRSCALEWINDOWEXTEX
  5063.         pEmr As emr
  5064.         xNum As Long
  5065.         xDenom As Long
  5066.         yNum As Long
  5067.         yDemon As Long
  5068. End Type
  5069.  
  5070. Type EMRSETWORLDTRANSFORM
  5071.         pEmr As emr
  5072.         xform As XFORM
  5073. End Type
  5074.  
  5075. Type EMRMODIFYWORLDTRANSFORM
  5076.         pEmr As emr
  5077.         xform As XFORM
  5078.         iMode As Long
  5079. End Type
  5080.  
  5081. Type EMRSETPIXELV
  5082.         pEmr As emr
  5083.         ptlPixel As POINTL
  5084.         crColor As Long
  5085. End Type
  5086.  
  5087. Type EMREXTFLOODFILL
  5088.         pEmr As emr
  5089.         ptlStart As POINTL
  5090.         crColor As Long
  5091.         iMode As Long
  5092. End Type
  5093.  
  5094. Type EMRELLIPSE
  5095.         pEmr As emr
  5096.         rclBox As RECTL
  5097. End Type
  5098.  
  5099. Type EMRRECTANGLE
  5100.         pEmr As emr
  5101.         rclBox As RECTL
  5102. End Type
  5103.  
  5104. Type EMRROUNDRECT
  5105.         pEmr As emr
  5106.         rclBox As RECTL
  5107.         szlCorner As SIZEL
  5108. End Type
  5109.  
  5110. Type EMRARC
  5111.         pEmr As emr
  5112.         rclBox As RECTL
  5113.         ptlStart As POINTL
  5114.         ptlEnd As POINTL
  5115. End Type
  5116.  
  5117. Type EMRARCTO
  5118.         pEmr As emr
  5119.         rclBox As RECTL
  5120.         ptlStart As POINTL
  5121.         ptlEnd As POINTL
  5122. End Type
  5123.  
  5124. Type EMRCHORD
  5125.         pEmr As emr
  5126.         rclBox As RECTL
  5127.         ptlStart As POINTL
  5128.         ptlEnd As POINTL
  5129. End Type
  5130.  
  5131. Type EMRPIE
  5132.         pEmr As emr
  5133.         rclBox As RECTL
  5134.         ptlStart As POINTL
  5135.         ptlEnd As POINTL
  5136. End Type
  5137.  
  5138. Type EMRANGLEARC
  5139.         pEmr As emr
  5140.         ptlCenter As POINTL
  5141.         nRadius As Long
  5142.         eStartAngle As Double
  5143.         eSweepAngle As Double
  5144. End Type
  5145.  
  5146. Type EMRPOLYLINE
  5147.         pEmr As emr
  5148.         rclBounds As RECTL
  5149.         cptl As Long
  5150.         aptl(1) As POINTL
  5151. End Type
  5152.  
  5153. Type EMRPOLYBEZIER
  5154.         pEmr As emr
  5155.         rclBounds As RECTL
  5156.         cptl As Long
  5157.         aptl(1) As POINTL
  5158. End Type
  5159.  
  5160. Type EMRPOLYGON
  5161.         pEmr As emr
  5162.         rclBounds As RECTL
  5163.         cptl As Long
  5164.         aptl(1) As POINTL
  5165. End Type
  5166.  
  5167. Type EMRPOLYBEZIERTO
  5168.         pEmr As emr
  5169.         rclBounds As RECTL
  5170.         cptl As Long
  5171.         aptl(1) As POINTL
  5172. End Type
  5173.  
  5174. Type EMRPOLYLINE16
  5175.         pEmr As emr
  5176.         rclBounds As RECTL
  5177.         cpts As Long
  5178.         apts(1) As POINTS
  5179. End Type
  5180.  
  5181. Type EMRPOLYBEZIER16
  5182.         pEmr As emr
  5183.         rclBounds As RECTL
  5184.         cpts As Long
  5185.         apts(1) As POINTS
  5186. End Type
  5187.  
  5188. Type EMRPOLYGON16
  5189.         pEmr As emr
  5190.         rclBounds As RECTL
  5191.         cpts As Long
  5192.         apts(1) As POINTS
  5193. End Type
  5194.  
  5195. Type EMRPLOYBEZIERTO16
  5196.         pEmr As emr
  5197.         rclBounds As RECTL
  5198.         cpts As Long
  5199.         apts(1) As POINTS
  5200. End Type
  5201.  
  5202. Type EMRPOLYLINETO16
  5203.         pEmr As emr
  5204.         rclBounds As RECTL
  5205.         cpts As Long
  5206.         apts(1) As POINTS
  5207. End Type
  5208.  
  5209. Type EMRPOLYDRAW
  5210.         pEmr As emr
  5211.         rclBounds As RECTL
  5212.         cptl As Long
  5213.         aptl(1) As POINTL
  5214.         abTypes(1) As Integer
  5215. End Type
  5216.  
  5217. Type EMRPOLYDRAW16
  5218.         pEmr As emr
  5219.         rclBounds As RECTL
  5220.         cpts As Long
  5221.         apts(1) As POINTS
  5222.         abTypes(1) As Integer
  5223. End Type
  5224.  
  5225. Type EMRPOLYPOLYLINE
  5226.         pEmr As emr
  5227.         rclBounds As RECTL
  5228.         nPolys As Long
  5229.         cptl As Long
  5230.         aPolyCounts(1) As Long
  5231.         aptl(1) As POINTL
  5232. End Type
  5233.  
  5234. Type EMRPOLYPOLYGON
  5235.         pEmr As emr
  5236.         rclBounds As RECTL
  5237.         nPolys As Long
  5238.         cptl As Long
  5239.         aPolyCounts(1) As Long
  5240.         aptl(1) As POINTL
  5241. End Type
  5242.  
  5243. Type EMRPOLYPOLYLINE16
  5244.         pEmr As emr
  5245.         rclBounds As RECTL
  5246.         nPolys As Long
  5247.         cpts As Long
  5248.         aPolyCounts(1) As Long
  5249.         apts(1) As POINTS
  5250. End Type
  5251.  
  5252. Type EMRPOLYPOLYGON16
  5253.         pEmr As emr
  5254.         rclBounds As RECTL
  5255.         nPolys As Long
  5256.         cpts As Long
  5257.         aPolyCounts(1) As Long
  5258.         apts(1) As POINTS
  5259. End Type
  5260.  
  5261. Type EMRINVERTRGN
  5262.         pEmr As emr
  5263.         rclBounds As RECTL
  5264.         cbRgnData As Long
  5265.         RgnData(1) As Integer
  5266. End Type
  5267.  
  5268. Type EMRPAINTRGN
  5269.         pEmr As emr
  5270.         rclBounds As RECTL
  5271.         cbRgnData As Long
  5272.         RgnData(1) As Integer
  5273. End Type
  5274.  
  5275. Type EMRFILLRGN
  5276.         pEmr As emr
  5277.         rclBounds As RECTL
  5278.         cbRgnData As Long
  5279.         ihBrush As Long
  5280.         RgnData(1) As Integer
  5281. End Type
  5282.  
  5283. Type EMRFRAMERGN
  5284.         pEmr As emr
  5285.         rclBounds As RECTL
  5286.         cbRgnData As Long
  5287.         ihBrush As Long
  5288.         szlStroke As SIZEL
  5289.         RgnData(1) As Integer
  5290. End Type
  5291.  
  5292. Type EMREXTSELECTCLIPRGN
  5293.         pEmr As emr
  5294.         cbRgnData As Long
  5295.         iMode As Long
  5296.         RgnData(1) As Integer
  5297. End Type
  5298.  
  5299. Type EMREXTTEXTOUT
  5300.         pEmr As emr
  5301.         rclBounds As RECTL
  5302.         iGraphicsMode As Long
  5303.         exScale As Double
  5304.         eyScale As Double
  5305.         emrtext As emrtext
  5306. End Type
  5307.  
  5308. Type EMRBITBLT
  5309.         pEmr As emr
  5310.         rclBounds As RECTL
  5311.         xDest As Long
  5312.         yDest As Long
  5313.         cxDest As Long
  5314.         cyDest As Long
  5315.         dwRop As Long
  5316.         xSrc As Long
  5317.         ySrc As Long
  5318.         xformSrc As xform
  5319.         crBkColorSrc As Long
  5320.         iUsageSrc As Long
  5321.         offBmiSrc As Long
  5322.         cbBmiSrc As Long
  5323.         offBitsSrc As Long
  5324.         cbBitsSrc As Long
  5325. End Type
  5326.  
  5327. Type EMRSTRETCHBLT
  5328.         pEmr As emr
  5329.         rclBounds As RECTL
  5330.         xDest As Long
  5331.         yDest As Long
  5332.         cxDest As Long
  5333.         cyDest As Long
  5334.         dwRop As Long
  5335.         xSrc As Long
  5336.         ySrc As Long
  5337.         xformSrc As xform
  5338.         crBkColorSrc As Long
  5339.         iUsageSrc As Long
  5340.         offBmiSrc As Long
  5341.         cbBmiSrc As Long
  5342.         offBitsSrc As Long
  5343.         cbBitsSrc As Long
  5344.         cxSrc As Long
  5345.         cySrc As Long
  5346. End Type
  5347.  
  5348. Type EMRMASKBLT
  5349.         pEmr As emr
  5350.         rclBounds As RECTL
  5351.         xDest As Long
  5352.         yDest As Long
  5353.         cxDest As Long
  5354.         cyDest As Long
  5355.         dwRop As Long
  5356.         xSrc2 As Long
  5357.         cyDest2 As Long
  5358.         dwRop2 As Long
  5359.         xSrc As Long
  5360.         ySrc As Long
  5361.         xformSrc As XFORM
  5362.         crBkColorSrc As Long
  5363.         iUsageSrc As Long
  5364.         offBmiSrc As Long
  5365.         cbBmiSrc As Long
  5366.         offBitsSrc As Long
  5367.         cbBitsSrc As Long
  5368.         xMask As Long
  5369.         yMask As Long
  5370.         iUsageMask As Long
  5371.         offBmiMask As Long
  5372.         cbBmiMask As Long
  5373.         offBitsMask As Long
  5374.         cbBitsMask As Long
  5375. End Type
  5376.  
  5377. Type EMRPLGBLT
  5378.         pEmr As emr
  5379.         rclBounds As RECTL
  5380.         aptlDest(3) As POINTL
  5381.         xSrc As Long
  5382.         ySrc As Long
  5383.         cxSrc As Long
  5384.         cySrc As Long
  5385.         xformSrc As XFORM
  5386.         crBkColorSrc As Long
  5387.         iUsageSrc As Long
  5388.         offBmiSrc As Long
  5389.         cbBmiSrc As Long
  5390.         offBitsSrc As Long
  5391.         cbBitsSrc As Long
  5392.         xMask As Long
  5393.         yMask As Long
  5394.         iUsageMask As Long
  5395.         offBmiMask As Long
  5396.         cbBmiMask As Long
  5397.         offBitsMask As Long
  5398.         cbBitsMask As Long
  5399. End Type
  5400.  
  5401. Type EMRSETDIBITSTODEVICE
  5402.         pEmr As emr
  5403.         rclBounds As RECTL
  5404.         xDest As Long
  5405.         yDest As Long
  5406.         xSrc As Long
  5407.         ySrc As Long
  5408.         cxSrc As Long
  5409.         cySrc As Long
  5410.         offBmiSrc As Long
  5411.         cbBmiSrc As Long
  5412.         offBitsSrc As Long
  5413.         cbBitsSrc As Long
  5414.         iUsageSrc As Long
  5415.         iStartScan As Long
  5416.         cScans As Long
  5417. End Type
  5418.  
  5419. Type EMRSTRETCHDIBITS
  5420.         pEmr As emr
  5421.         rclBounds As RECTL
  5422.         xDest As Long
  5423.         yDest As Long
  5424.         xSrc As Long
  5425.         ySrc As Long
  5426.         cxSrc As Long
  5427.         cySrc As Long
  5428.         offBmiSrc As Long
  5429.         cbBmiSrc As Long
  5430.         offBitsSrc As Long
  5431.         cbBitsSrc As Long
  5432.         iUsageSrc As Long
  5433.         dwRop As Long
  5434.         cxDest As Long
  5435.         cyDest As Long
  5436. End Type
  5437.  
  5438. Type EMREXTCREATEFONTINDIRECT
  5439.         pEmr As emr
  5440.         ihFont As Long
  5441.         elfw As EXTLOGFONT
  5442. End Type
  5443.  
  5444. Type EMRCREATEPALETTE
  5445.         pEmr As emr
  5446.         ihPal As Long
  5447.         lgpl As LOGPALETTE
  5448. End Type
  5449.  
  5450. Type EMRCREATEPEN
  5451.         pEmr As emr
  5452.         ihPen As Long
  5453.         lopn As LOGPEN
  5454. End Type
  5455.  
  5456. Type EMREXTCREATEPEN
  5457.         pEmr As emr
  5458.         ihPen As Long
  5459.         offBmi As Long
  5460.         cbBmi As Long
  5461.         offBits As Long
  5462.         cbBits As Long
  5463.         elp As EXTLOGPEN
  5464. End Type
  5465.  
  5466. Type EMRCREATEBRUSHINDIRECT
  5467.         pEmr As emr
  5468.         ihBrush As Long
  5469.         lb As LOGBRUSH
  5470. End Type
  5471.  
  5472. Type EMRCREATEMONOBRUSH
  5473.         pEmr As emr
  5474.         ihBrush As Long
  5475.         iUsage As Long
  5476.         offBmi As Long
  5477.         cbBmi As Long
  5478.         offBits As Long
  5479.         cbBits As Long
  5480. End Type
  5481.  
  5482. Type EMRCREATEDIBPATTERNBRUSHPT
  5483.         pEmr As emr
  5484.         ihBursh As Long
  5485.         iUsage As Long
  5486.         offBmi As Long
  5487.         cbBmi As Long
  5488.         offBits As Long
  5489.         cbBits As Long
  5490. End Type
  5491.  
  5492. ' new wingdi
  5493. ' *************************************************************************
  5494. ' *                                                                         *
  5495. ' * wingdi.h -- GDI procedure declarations, constant definitions and macros *
  5496. ' *                                                                         *
  5497. ' * Copyright (c) 1985-1995, Microsoft Corp. All rights reserved.           *
  5498. ' *                                                                         *
  5499. ' **************************************************************************/
  5500.  
  5501. '  StretchBlt() Modes
  5502. Const STRETCH_ANDSCANS = 1
  5503. Const STRETCH_ORSCANS = 2
  5504. Const STRETCH_DELETESCANS = 3
  5505. Const STRETCH_HALFTONE = 4
  5506.  
  5507. Type BITMAPV4HEADER
  5508.         bV4Size As Long
  5509.         bV4Width As Long
  5510.         bV4Height As Long
  5511.         bV4Planes As Integer
  5512.         bV4BitCount As Integer
  5513.         bV4V4Compression As Long
  5514.         bV4SizeImage As Long
  5515.         bV4XPelsPerMeter As Long
  5516.         bV4YPelsPerMeter As Long
  5517.         bV4ClrUsed As Long
  5518.         bV4ClrImportant As Long
  5519.         bV4RedMask As Long
  5520.         bV4GreenMask As Long
  5521.         bV4BlueMask As Long
  5522.         bV4AlphaMask As Long
  5523.         bV4CSType As Long
  5524.         bV4Endpoints As Long
  5525.         bV4GammaRed As Long
  5526.         bV4GammaGreen As Long
  5527.         bV4GammaBlue As Long
  5528. End Type
  5529.  
  5530. Type FONTSIGNATURE
  5531.         fsUsb(4) As Long
  5532.         fsCsb(2) As Long
  5533. End Type
  5534.  
  5535. Type CHARSETINFO
  5536.         ciCharset As Long
  5537.         ciACP As Long
  5538.         fs As FONTSIGNATURE
  5539. End Type
  5540.  
  5541. Const TCI_SRCCHARSET = 1
  5542. Const TCI_SRCCODEPAGE = 2
  5543. Const TCI_SRCFONTSIG = 3
  5544.  
  5545. Type LOCALESIGNATURE
  5546.         lsUsb(4) As Long
  5547.         lsCsbDefault(2) As Long
  5548.         lsCsbSupported(2) As Long
  5549. End Type
  5550.  
  5551. Type NEWTEXTMETRICEX
  5552.         ntmTm As NEWTEXTMETRIC
  5553.         ntmFontSig As FONTSIGNATURE
  5554. End Type
  5555.  
  5556. Type ENUMLOGFONTEX
  5557.         elfLogFont As LOGFONT
  5558.         elfFullName(LF_FULLFACESIZE) As Byte
  5559.         elfStyle(LF_FACESIZE) As Byte
  5560.         elfScript(LF_FACESIZE) As Byte
  5561. End Type
  5562.  
  5563. Const MONO_FONT = 8
  5564. Const JOHAB_CHARSET = 130
  5565. Const HEBREW_CHARSET = 177
  5566. Const ARABIC_CHARSET = 178
  5567. Const GREEK_CHARSET = 161
  5568. Const TURKISH_CHARSET = 162
  5569. Const THAI_CHARSET = 222
  5570. Const EASTEUROPE_CHARSET = 238
  5571. Const RUSSIAN_CHARSET = 204
  5572.  
  5573. Const MAC_CHARSET = 77
  5574. Const BALTIC_CHARSET = 186
  5575.  
  5576. Const FS_LATIN1 = &H1&
  5577. Const FS_LATIN2 = &H2&
  5578. Const FS_CYRILLIC = &H4&
  5579. Const FS_GREEK = &H8&
  5580. Const FS_TURKISH = &H10&
  5581. Const FS_HEBREW = &H20&
  5582. Const FS_ARABIC = &H40&
  5583. Const FS_BALTIC = &H80&
  5584. Const FS_THAI = &H10000
  5585. Const FS_JISJAPAN = &H20000
  5586. Const FS_CHINESESIMP = &H40000
  5587. Const FS_WANSUNG = &H80000
  5588. Const FS_CHINESETRAD = &H100000
  5589. Const FS_JOHAB = &H200000
  5590. Const FS_SYMBOL = &H80000000
  5591. Const DEFAULT_GUI_FONT = 17
  5592. '  current version of specification
  5593. Const DM_RESERVED1 = &H800000
  5594. Const DM_RESERVED2 = &H1000000
  5595. Const DM_ICMMETHOD = &H2000000
  5596. Const DM_ICMINTENT = &H4000000
  5597. Const DM_MEDIATYPE = &H8000000
  5598. Const DM_DITHERTYPE = &H10000000
  5599. Const DMPAPER_ISO_B4 = 42                '  B4 (ISO) 250 x 353 mm
  5600. Const DMPAPER_JAPANESE_POSTCARD = 43     '  Japanese Postcard 100 x 148 mm
  5601. Const DMPAPER_9X11 = 44                  '  9 x 11 in
  5602. Const DMPAPER_10X11 = 45                 '  10 x 11 in
  5603. Const DMPAPER_15X11 = 46                 '  15 x 11 in
  5604. Const DMPAPER_ENV_INVITE = 47            '  Envelope Invite 220 x 220 mm
  5605. Const DMPAPER_RESERVED_48 = 48           '  RESERVED--DO NOT USE
  5606. Const DMPAPER_RESERVED_49 = 49           '  RESERVED--DO NOT USE
  5607. Const DMPAPER_LETTER_EXTRA = 50              '  Letter Extra 9 \275 x 12 in
  5608. Const DMPAPER_LEGAL_EXTRA = 51               '  Legal Extra 9 \275 x 15 in
  5609. Const DMPAPER_TABLOID_EXTRA = 52              '  Tabloid Extra 11.69 x 18 in
  5610. Const DMPAPER_A4_EXTRA = 53                   '  A4 Extra 9.27 x 12.69 in
  5611. Const DMPAPER_LETTER_TRANSVERSE = 54     '  Letter Transverse 8 \275 x 11 in
  5612. Const DMPAPER_A4_TRANSVERSE = 55         '  A4 Transverse 210 x 297 mm
  5613. Const DMPAPER_LETTER_EXTRA_TRANSVERSE = 56 '  Letter Extra Transverse 9\275 x 12 in
  5614. Const DMPAPER_A_PLUS = 57                '  SuperA/SuperA/A4 227 x 356 mm
  5615. Const DMPAPER_B_PLUS = 58                '  SuperB/SuperB/A3 305 x 487 mm
  5616. Const DMPAPER_LETTER_PLUS = 59           '  Letter Plus 8.5 x 12.69 in
  5617. Const DMPAPER_A4_PLUS = 60               '  A4 Plus 210 x 330 mm
  5618. Const DMPAPER_A5_TRANSVERSE = 61         '  A5 Transverse 148 x 210 mm
  5619. Const DMPAPER_B5_TRANSVERSE = 62         '  B5 (JIS) Transverse 182 x 257 mm
  5620. Const DMPAPER_A3_EXTRA = 63              '  A3 Extra 322 x 445 mm
  5621. Const DMPAPER_A5_EXTRA = 64              '  A5 Extra 174 x 235 mm
  5622. Const DMPAPER_B5_EXTRA = 65              '  B5 (ISO) Extra 201 x 276 mm
  5623. Const DMPAPER_A2 = 66                    '  A2 420 x 594 mm
  5624. Const DMPAPER_A3_TRANSVERSE = 67         '  A3 Transverse 297 x 420 mm
  5625. Const DMPAPER_A3_EXTRA_TRANSVERSE = 68   '  A3 Extra Transverse 322 x 445 mm
  5626. Const DMTT_DOWNLOAD_OUTLINE = 4 '  download TT fonts as outline soft fonts
  5627.  
  5628. '  ICM methods
  5629. Const DMICMMETHOD_NONE = 1       '  ICM disabled
  5630. Const DMICMMETHOD_SYSTEM = 2     '  ICM handled by system
  5631. Const DMICMMETHOD_DRIVER = 3     '  ICM handled by driver
  5632. Const DMICMMETHOD_DEVICE = 4     '  ICM handled by device
  5633. Const DMICMMETHOD_USER = 256     '  Device-specific methods start here
  5634.  
  5635. '  ICM Intents
  5636. Const DMICM_SATURATE = 1         '  Maximize color saturation
  5637. Const DMICM_CONTRAST = 2         '  Maximize color contrast
  5638. Const DMICM_COLORMETRIC = 3      '  Use specific color metric
  5639. Const DMICM_USER = 256           '  Device-specific intents start here
  5640.  
  5641. '  Media types
  5642. Const DMMEDIA_STANDARD = 1         '  Standard paper
  5643. Const DMMEDIA_GLOSSY = 2           '  Glossy paper
  5644. Const DMMEDIA_TRANSPARENCY = 3     '  Transparency
  5645.  
  5646. Const DMMEDIA_USER = 256           '  Device-specific media start here
  5647.  
  5648. '  Dither types
  5649. Const DMDITHER_NONE = 1          '  No dithering
  5650. Const DMDITHER_COARSE = 2        '  Dither with a coarse brush
  5651. Const DMDITHER_FINE = 3          '  Dither with a fine brush
  5652. Const DMDITHER_LINEART = 4       '  LineArt dithering
  5653. Const DMDITHER_GRAYSCALE = 5     '  Device does grayscaling
  5654. Const DMDITHER_USER = 256        '  Device-specific dithers start here
  5655. Const GGO_GRAY2_BITMAP = 4
  5656. Const GGO_GRAY4_BITMAP = 5
  5657. Const GGO_GRAY8_BITMAP = 6
  5658. Const GGO_GLYPH_INDEX = &H80
  5659. Const GCP_DBCS = &H1
  5660. Const GCP_REORDER = &H2
  5661. Const GCP_USEKERNING = &H8
  5662. Const GCP_GLYPHSHAPE = &H10
  5663. Const GCP_LIGATE = &H20
  5664. Const GCP_DIACRITIC = &H100
  5665. Const GCP_KASHIDA = &H400
  5666. Const GCP_ERROR = &H8000
  5667. Const FLI_MASK = &H103B
  5668. Const GCP_JUSTIFY = &H10000
  5669. Const GCP_NODIACRITICS = &H20000
  5670. Const FLI_GLYPHS = &H40000
  5671. Const GCP_CLASSIN = &H80000
  5672. Const GCP_MAXEXTENT = &H100000
  5673. Const GCP_JUSTIFYIN = &H200000
  5674. Const GCP_DISPLAYZWG = &H400000
  5675. Const GCP_SYMSWAPOFF = &H800000
  5676. Const GCP_NUMERICOVERRIDE = &H1000000
  5677. Const GCP_NEUTRALOVERRIDE = &H2000000
  5678. Const GCP_NUMERICSLATIN = &H4000000
  5679. Const GCP_NUMERICSLOCAL = &H8000000
  5680. Const GCPCLASS_LATIN = 1
  5681. Const GCPCLASS_HEBREW = 2
  5682. Const GCPCLASS_ARABIC = 2
  5683. Const GCPCLASS_NEUTRAL = 3
  5684. Const GCPCLASS_LOCALNUMBER = 4
  5685. Const GCPCLASS_LATINNUMBER = 5
  5686. Const GCPCLASS_LATINNUMERICTERMINATOR = 6
  5687. Const GCPCLASS_LATINNUMERICSEPARATOR = 7
  5688. Const GCPCLASS_NUMERICSEPARATOR = 8
  5689. Const GCPCLASS_PREBOUNDRTL = &H80
  5690. Const GCPCLASS_PREBOUNDLTR = &H40
  5691.  
  5692.  
  5693.  
  5694. Type GCP_RESULTS
  5695.         lStructSize As Long
  5696.         lpOutString As String
  5697.         lpOrder As Long
  5698.         lpDX As Long
  5699.         lpCaretPos As Long
  5700.         lpClass As String
  5701.         lpGlyphs As String
  5702.         nGlyphs As Long
  5703.         nMaxFit As Long
  5704. End Type
  5705.  
  5706. Const DC_BINADJUST = 19
  5707. Const DC_EMF_COMPLIANT = 20
  5708. Const DC_DATATYPE_PRODUCED = 21
  5709. Const DC_COLLATE = 22
  5710.  
  5711. Const DCTT_DOWNLOAD_OUTLINE = &H8&
  5712.  
  5713. '  return values for DC_BINADJUST
  5714. Const DCBA_FACEUPNONE = &H0
  5715. Const DCBA_FACEUPCENTER = &H1
  5716. Const DCBA_FACEUPLEFT = &H2
  5717. Const DCBA_FACEUPRIGHT = &H3
  5718. Const DCBA_FACEDOWNNONE = &H100
  5719. Const DCBA_FACEDOWNCENTER = &H101
  5720. Const DCBA_FACEDOWNLEFT = &H102
  5721. Const DCBA_FACEDOWNRIGHT = &H103
  5722.  
  5723. Declare Function EnumFontFamilies Lib "gdi32" Alias "EnumFontFamiliesA" (ByVal hdc As Long, ByVal lpszFamily As String, ByVal lpEnumFontFamProc As Long, ByVal lParam As Long) As Long
  5724. Declare Function EnumFontFamiliesEx Lib "gdi32" Alias "EnumFontFamiliesExA" (ByVal hdc As Long, lpLogFont As LOGFONT, ByVal lpEnumFontProc As Long, ByVal lParam As Long, ByVal dw As Long) As Long
  5725. Declare Function GetTextCharset Lib "gdi32" Alias "GetTextCharset" (ByVal hdc As Long) As Long
  5726. Declare Function GetTextCharsetInfo Lib "gdi32" Alias "GetTextCharsetInfo" (ByVal hdc As Long, lpSig As FONTSIGNATURE, ByVal dwFlags As Long) As Long
  5727.  
  5728. Declare Function TranslateCharsetInfo Lib "gdi32" Alias "TranslateCharsetInfo" (lpSrc As Long, lpcs As CHARSETINFO, ByVal dwFlags As Long) As Long
  5729. Declare Function GetFontLanguageInfo Lib "gdi32" Alias "GetFontLanguageInfo" (ByVal hdc As Long) As Long
  5730. Declare Function GetCharacterPlacement Lib "gdi32" Alias " GetCharacterPlacementA" (ByVal hdc As Long, ByVal lpsz As String, ByVal n1 As Long, ByVal n2 As Long, lpGcpResults As GCP_RESULTS, ByVal dw As Long) As Long
  5731.  
  5732. Const ICM_OFF = 1
  5733. Const ICM_ON = 2
  5734. Const ICM_QUERY = 3
  5735.  
  5736. Type CIEXYZ
  5737.     ciexyzX As Long
  5738.     ciexyzY As Long
  5739.     ciexyzZ As Long
  5740. End Type
  5741.  
  5742. Type CIEXYZTRIPLE
  5743.     ciexyzRed As CIEXYZ
  5744.     ciexyzGreen As CIEXYZ
  5745.     ciexyBlue As CIEXYZ
  5746. End Type
  5747.  
  5748. Type LOGCOLORSPACE
  5749.     lcsSignature As Long
  5750.     lcsVersion As Long
  5751.     lcsSize As Long
  5752.     lcsCSType As Long
  5753.     lcsIntent As Long
  5754.     lcsEndPoints As CIEXYZTRIPLE
  5755.     lcsGammaRed As Long
  5756.     lcsGammaGreen As Long
  5757.     lcsGammaBlue As Long
  5758.     lcsFileName As String * MAX_PATH
  5759. End Type
  5760.  
  5761. Declare Function SetICMMode Lib "gdi32" Alias "SetICMMode" (ByVal hdc As Long, ByVal n As Long) As Long
  5762. Declare Function CheckColorsInGamut Lib "gdi32" Alias "CheckColorsInGamut" (ByVal hdc As Long, lpv As Any, lpv2 As Any, ByVal dw As Long) As Long
  5763. Declare Function GetLogColorSpace Lib "gdi32" Alias "GetLogColorSpaceA" (ByVal hcolorspace As Long, ByVal lplogcolorspace As LOGCOLORSPACE, ByVal dw As Long) As Long
  5764. Declare Function GetColorSpace Lib "gdi32" Alias "GetColorSpace" (ByVal hdc As Long) As Long
  5765.  
  5766. Declare Function CreateColorSpace Lib "gdi32" Alias "CreateColorSpaceA" (lplogcolorspace As LOGCOLORSPACE) As Long
  5767.  
  5768. Declare Function SetColorSpace Lib "gdi32" Alias "SetColorSpace" (ByVal hdc As Long, ByVal hcolorspace As Long) As Long
  5769. Declare Function DeleteColorSpace Lib "gdi32" Alias "DeleteColorSpace" (ByVal hcolorspace As Long) As Long
  5770. Declare Function GetICMProfile Lib "gdi32" Alias "GetICMProfileA" (ByVal hdc As Long, ByVal dw As Long, ByVal lpStr As String) As Long
  5771. Declare Function SetICMProfile Lib "gdi32" Alias "SetICMProfileA" (ByVal hdc As Long, ByVal lpStr As String) As Long
  5772. Declare Function GetDeviceGammaRamp Lib "gdi32" Alias "GetDeviceGammaRamp" (ByVal hdc As Long, lpv As Any) As Long
  5773. Declare Function SetDeviceGammaRamp Lib "gdi32" Alias "SetDeviceGammaRamp" (ByVal hdc As Long, lpv As Any) As Long
  5774. Declare Function ColorMatchToTarget Lib "gdi32" Alias "ColorMatchToTarget" (ByVal hdc As Long, ByVal hdc2 As Long, ByVal dw As Long) As Long
  5775.  
  5776. Declare Function EnumICMProfiles Lib "gdi32" Alias "EnumICMProfilesA" (ByVal hdc As Long, ByVal icmEnumProc As Long, ByVal lParam As Long) As Long
  5777.  
  5778. Const EMR_SETICMMODE = 98
  5779. Const EMR_CREATECOLORSPACE = 99
  5780. Const EMR_SETCOLORSPACE = 100
  5781. Const EMR_DELETECOLORSPACE = 101
  5782.  
  5783. Type EMRSELECTCOLORSPACE
  5784.         pEmr As emr
  5785.         ihCS As Long               '  ColorSpace handle index
  5786. End Type
  5787.  
  5788. Type EMRCREATECOLORSPACE
  5789.         pEmr As emr
  5790.         ihCS As Long        '  ColorSpace handle index
  5791.         lcs As LOGCOLORSPACE
  5792. End Type
  5793.  
  5794.  
  5795. ' --------------
  5796. '  USER Section
  5797. ' --------------
  5798.  
  5799. ' Scroll Bar Constants
  5800. Const SB_HORZ = 0
  5801. Const SB_VERT = 1
  5802. Const SB_CTL = 2
  5803. Const SB_BOTH = 3
  5804.  
  5805. ' Scroll Bar Commands
  5806. Const SB_LINEUP = 0
  5807. Const SB_LINELEFT = 0
  5808. Const SB_LINEDOWN = 1
  5809. Const SB_LINERIGHT = 1
  5810. Const SB_PAGEUP = 2
  5811. Const SB_PAGELEFT = 2
  5812. Const SB_PAGEDOWN = 3
  5813. Const SB_PAGERIGHT = 3
  5814. Const SB_THUMBPOSITION = 4
  5815. Const SB_THUMBTRACK = 5
  5816. Const SB_TOP = 6
  5817. Const SB_LEFT = 6
  5818. Const SB_BOTTOM = 7
  5819. Const SB_RIGHT = 7
  5820. Const SB_ENDSCROLL = 8
  5821.  
  5822. ' ShowWindow() Commands
  5823. Const SW_HIDE = 0
  5824. Const SW_SHOWNORMAL = 1
  5825. Const SW_NORMAL = 1
  5826. Const SW_SHOWMINIMIZED = 2
  5827. Const SW_SHOWMAXIMIZED = 3
  5828. Const SW_MAXIMIZE = 3
  5829. Const SW_SHOWNOACTIVATE = 4
  5830. Const SW_SHOW = 5
  5831. Const SW_MINIMIZE = 6
  5832. Const SW_SHOWMINNOACTIVE = 7
  5833. Const SW_SHOWNA = 8
  5834. Const SW_RESTORE = 9
  5835. Const SW_SHOWDEFAULT = 10
  5836. Const SW_MAX = 10
  5837.  
  5838. ' Old ShowWindow() Commands
  5839. Const HIDE_WINDOW = 0
  5840. Const SHOW_OPENWINDOW = 1
  5841. Const SHOW_ICONWINDOW = 2
  5842. Const SHOW_FULLSCREEN = 3
  5843. Const SHOW_OPENNOACTIVATE = 4
  5844.  
  5845. ' Identifiers for the WM_SHOWWINDOW message
  5846. Const SW_PARENTCLOSING = 1
  5847. Const SW_OTHERZOOM = 2
  5848. Const SW_PARENTOPENING = 3
  5849. Const SW_OTHERUNZOOM = 4
  5850.  
  5851. ' WM_KEYUP/DOWN/CHAR HIWORD(lParam) flags
  5852. Const KF_EXTENDED = &H100
  5853. Const KF_DLGMODE = &H800
  5854. Const KF_MENUMODE = &H1000
  5855. Const KF_ALTDOWN = &H2000
  5856. Const KF_REPEAT = &H4000
  5857. Const KF_UP = &H8000
  5858.  
  5859. ' Virtual Keys, Standard Set
  5860. Const VK_LBUTTON = &H1
  5861. Const VK_RBUTTON = &H2
  5862. Const VK_CANCEL = &H3
  5863. Const VK_MBUTTON = &H4             '  NOT contiguous with L RBUTTON
  5864.  
  5865. Const VK_BACK = &H8
  5866. Const VK_TAB = &H9
  5867.  
  5868. Const VK_CLEAR = &HC
  5869. Const VK_RETURN = &HD
  5870.  
  5871. Const VK_SHIFT = &H10
  5872. Const VK_CONTROL = &H11
  5873. Const VK_MENU = &H12
  5874. Const VK_PAUSE = &H13
  5875. Const VK_CAPITAL = &H14
  5876.  
  5877. Const VK_ESCAPE = &H1B
  5878.  
  5879. Const VK_SPACE = &H20
  5880. Const VK_PRIOR = &H21
  5881. Const VK_NEXT = &H22
  5882. Const VK_END = &H23
  5883. Const VK_HOME = &H24
  5884. Const VK_LEFT = &H25
  5885. Const VK_UP = &H26
  5886. Const VK_RIGHT = &H27
  5887. Const VK_DOWN = &H28
  5888. Const VK_SELECT = &H29
  5889. Const VK_PRINT = &H2A
  5890. Const VK_EXECUTE = &H2B
  5891. Const VK_SNAPSHOT = &H2C
  5892. Const VK_INSERT = &H2D
  5893. Const VK_DELETE = &H2E
  5894. Const VK_HELP = &H2F
  5895.  
  5896. ' VK_A thru VK_Z are the same as their ASCII equivalents: 'A' thru 'Z'
  5897. ' VK_0 thru VK_9 are the same as their ASCII equivalents: '0' thru '9'
  5898.  
  5899. Const VK_NUMPAD0 = &H60
  5900. Const VK_NUMPAD1 = &H61
  5901. Const VK_NUMPAD2 = &H62
  5902. Const VK_NUMPAD3 = &H63
  5903. Const VK_NUMPAD4 = &H64
  5904. Const VK_NUMPAD5 = &H65
  5905. Const VK_NUMPAD6 = &H66
  5906. Const VK_NUMPAD7 = &H67
  5907. Const VK_NUMPAD8 = &H68
  5908. Const VK_NUMPAD9 = &H69
  5909. Const VK_MULTIPLY = &H6A
  5910. Const VK_ADD = &H6B
  5911. Const VK_SEPARATOR = &H6C
  5912. Const VK_SUBTRACT = &H6D
  5913. Const VK_DECIMAL = &H6E
  5914. Const VK_DIVIDE = &H6F
  5915. Const VK_F1 = &H70
  5916. Const VK_F2 = &H71
  5917. Const VK_F3 = &H72
  5918. Const VK_F4 = &H73
  5919. Const VK_F5 = &H74
  5920. Const VK_F6 = &H75
  5921. Const VK_F7 = &H76
  5922. Const VK_F8 = &H77
  5923. Const VK_F9 = &H78
  5924. Const VK_F10 = &H79
  5925. Const VK_F11 = &H7A
  5926. Const VK_F12 = &H7B
  5927. Const VK_F13 = &H7C
  5928. Const VK_F14 = &H7D
  5929. Const VK_F15 = &H7E
  5930. Const VK_F16 = &H7F
  5931. Const VK_F17 = &H80
  5932. Const VK_F18 = &H81
  5933. Const VK_F19 = &H82
  5934. Const VK_F20 = &H83
  5935. Const VK_F21 = &H84
  5936. Const VK_F22 = &H85
  5937. Const VK_F23 = &H86
  5938. Const VK_F24 = &H87
  5939.  
  5940. Const VK_NUMLOCK = &H90
  5941. Const VK_SCROLL = &H91
  5942.  
  5943. '
  5944. '   VK_L VK_R - left and right Alt, Ctrl and Shift virtual keys.
  5945. '   Used only as parameters to GetAsyncKeyState() and GetKeyState().
  5946. '   No other API or message will distinguish left and right keys in this way.
  5947. '  /
  5948. Const VK_LSHIFT = &HA0
  5949. Const VK_RSHIFT = &HA1
  5950. Const VK_LCONTROL = &HA2
  5951. Const VK_RCONTROL = &HA3
  5952. Const VK_LMENU = &HA4
  5953. Const VK_RMENU = &HA5
  5954.  
  5955. Const VK_ATTN = &HF6
  5956. Const VK_CRSEL = &HF7
  5957. Const VK_EXSEL = &HF8
  5958. Const VK_EREOF = &HF9
  5959. Const VK_PLAY = &HFA
  5960. Const VK_ZOOM = &HFB
  5961. Const VK_NONAME = &HFC
  5962. Const VK_PA1 = &HFD
  5963. Const VK_OEM_CLEAR = &HFE
  5964.  
  5965. ' SetWindowsHook() codes
  5966. Const WH_MIN = (-1)
  5967. Const WH_MSGFILTER = (-1)
  5968. Const WH_JOURNALRECORD = 0
  5969. Const WH_JOURNALPLAYBACK = 1
  5970. Const WH_KEYBOARD = 2
  5971. Const WH_GETMESSAGE = 3
  5972. Const WH_CALLWNDPROC = 4
  5973. Const WH_CBT = 5
  5974. Const WH_SYSMSGFILTER = 6
  5975. Const WH_MOUSE = 7
  5976. Const WH_HARDWARE = 8
  5977. Const WH_DEBUG = 9
  5978. Const WH_SHELL = 10
  5979. Const WH_FOREGROUNDIDLE = 11
  5980. Const WH_MAX = 11
  5981.  
  5982. ' Hook Codes
  5983. Const HC_ACTION = 0
  5984. Const HC_GETNEXT = 1
  5985. Const HC_SKIP = 2
  5986. Const HC_NOREMOVE = 3
  5987. Const HC_NOREM = HC_NOREMOVE
  5988. Const HC_SYSMODALON = 4
  5989. Const HC_SYSMODALOFF = 5
  5990.  
  5991. ' CBT Hook Codes
  5992. Const HCBT_MOVESIZE = 0
  5993. Const HCBT_MINMAX = 1
  5994. Const HCBT_QS = 2
  5995. Const HCBT_CREATEWND = 3
  5996. Const HCBT_DESTROYWND = 4
  5997. Const HCBT_ACTIVATE = 5
  5998. Const HCBT_CLICKSKIPPED = 6
  5999. Const HCBT_KEYSKIPPED = 7
  6000. Const HCBT_SYSCOMMAND = 8
  6001. Const HCBT_SETFOCUS = 9
  6002.  
  6003. ' HCBT_ACTIVATE structure pointed to by lParam
  6004. Type CBTACTIVATESTRUCT
  6005.         fMouse As Long
  6006.         hWndActive As Long
  6007. End Type
  6008.  
  6009. ' WH_MSGFILTER Filter Proc Codes
  6010. Const MSGF_DIALOGBOX = 0
  6011. Const MSGF_MESSAGEBOX = 1
  6012. Const MSGF_MENU = 2
  6013. Const MSGF_MOVE = 3
  6014. Const MSGF_SIZE = 4
  6015. Const MSGF_SCROLLBAR = 5
  6016. Const MSGF_NEXTWINDOW = 6
  6017. Const MSGF_MAINLOOP = 8
  6018. Const MSGF_MAX = 8
  6019. Const MSGF_USER = 4096
  6020.  
  6021. Const HSHELL_WINDOWCREATED = 1
  6022. Const HSHELL_WINDOWDESTROYED = 2
  6023. Const HSHELL_ACTIVATESHELLWINDOW = 3
  6024.  
  6025. ' Message Structure used in Journaling
  6026. Type EVENTMSG
  6027.         message As Long
  6028.         paramL As Long
  6029.         paramH As Long
  6030.         time As Long
  6031.         hwnd As Long
  6032. End Type
  6033.  
  6034. Type CWPSTRUCT
  6035.         lParam As Long
  6036.         wParam As Long
  6037.         message As Long
  6038.         hwnd As Long
  6039. End Type
  6040.  
  6041. Type DEBUGHOOKINFO
  6042.         hModuleHook As Long
  6043.         Reserved As Long
  6044.         lParam As Long
  6045.         wParam As Long
  6046.         code As Long
  6047. End Type
  6048.  
  6049.  
  6050. Type MOUSEHOOKSTRUCT
  6051.         pt As POINTAPI
  6052.         hwnd As Long
  6053.         wHitTestCode As Long
  6054.         dwExtraInfo As Long
  6055. End Type
  6056.  
  6057. ' Keyboard Layout API
  6058. Const HKL_PREV = 0
  6059. Const HKL_NEXT = 1
  6060.  
  6061. Const KLF_ACTIVATE = &H1
  6062. Const KLF_SUBSTITUTE_OK = &H2
  6063. Const KLF_UNLOADPREVIOUS = &H4
  6064. Const KLF_REORDER = &H8
  6065.  
  6066. ' Size of KeyboardLayoutName (number of characters), including nul terminator
  6067. Const KL_NAMELENGTH = 9
  6068.  
  6069. Declare Function LoadKeyboardLayout Lib "user32" Alias "LoadKeyboardLayoutA" (ByVal pwszKLID As String, ByVal flags As Long) As Long
  6070. Declare Function ActivateKeyboardLayout Lib "user32" Alias "ActivateKeyboardLayout" (ByVal HKL As Long, ByVal flags As Long) As Long
  6071. Declare Function UnloadKeyboardLayout Lib "user32" Alias "UnloadKeyboardLayout" (ByVal HKL As Long) As Long
  6072. Declare Function GetKeyboardLayoutName Lib "user32" Alias "GetKeyboardLayoutNameA" (ByVal pwszKLID As String) As Long
  6073.  
  6074. ' Desktop-specific access flags
  6075. Const DESKTOP_READOBJECTS = &H1&
  6076. Const DESKTOP_CREATEWINDOW = &H2&
  6077. Const DESKTOP_CREATEMENU = &H4&
  6078. Const DESKTOP_HOOKCONTROL = &H8&
  6079. Const DESKTOP_JOURNALRECORD = &H10&
  6080. Const DESKTOP_JOURNALPLAYBACK = &H20&
  6081. Const DESKTOP_ENUMERATE = &H40&
  6082. Const DESKTOP_WRITEOBJECTS = &H80&
  6083.  
  6084. Declare Function GetThreadDesktop Lib "user32" Alias "GetThreadDesktop" (ByVal dwThread As Long) As Long
  6085.  
  6086. ' Windowstation-specific access flags
  6087. Const WINSTA_ENUMDESKTOPS = &H1&
  6088. Const WINSTA_READATTRIBUTES = &H2&
  6089. Const WINSTA_ACCESSCLIPBOARD = &H4&
  6090. Const WINSTA_CREATEDESKTOP = &H8&
  6091. Const WINSTA_WRITEATTRIBUTES = &H10&
  6092. Const WINSTA_ACCESSPUBLICATOMS = &H20&
  6093. Const WINSTA_EXITWINDOWS = &H40&
  6094. Const WINSTA_ENUMERATE = &H100&
  6095. Const WINSTA_READSCREEN = &H200&
  6096.  
  6097. Declare Function GetProcessWindowStation Lib "user32" Alias "GetProcessWindowStation" () As Long
  6098. Declare Function SetUserObjectSecurity Lib "user32" Alias "SetUserObjectSecurity" (ByVal hObj As Long, pSIRequested As Long, pSd As SECURITY_DESCRIPTOR) As Long
  6099. Declare Function GetUserObjectSecurity Lib "user32" Alias "GetUserObjectSecurity" (ByVal hObj As Long, pSIRequested As Long, pSd As SECURITY_DESCRIPTOR, ByVal nLength As Long, lpnLengthNeeded As Long) As Long
  6100.  
  6101. ' Message structure
  6102.  
  6103. ' Window field offsets for GetWindowLong() and GetWindowWord()
  6104. Const GWL_WNDPROC = (-4)
  6105. Const GWL_HINSTANCE = (-6)
  6106. Const GWL_HWNDPARENT = (-8)
  6107. Const GWL_STYLE = (-16)
  6108. Const GWL_EXSTYLE = (-20)
  6109. Const GWL_USERDATA = (-21)
  6110. Const GWL_ID = (-12)
  6111.  
  6112. ' Class field offsets for GetClassLong() and GetClassWord()
  6113. Const GCL_MENUNAME = (-8)
  6114. Const GCL_HBRBACKGROUND = (-10)
  6115. Const GCL_HCURSOR = (-12)
  6116. Const GCL_HICON = (-14)
  6117. Const GCL_HMODULE = (-16)
  6118. Const GCL_CBWNDEXTRA = (-18)
  6119. Const GCL_CBCLSEXTRA = (-20)
  6120. Const GCL_WNDPROC = (-24)
  6121. Const GCL_STYLE = (-26)
  6122. Const GCW_ATOM = (-32)
  6123.  
  6124. ' Window Messages
  6125. Const WM_NULL = &H0
  6126. Const WM_CREATE = &H1
  6127. Const WM_DESTROY = &H2
  6128. Const WM_MOVE = &H3
  6129. Const WM_SIZE = &H5
  6130.  
  6131. Const WM_ACTIVATE = &H6
  6132. '
  6133. '  WM_ACTIVATE state values
  6134.  
  6135. Const WA_INACTIVE = 0
  6136. Const WA_ACTIVE = 1
  6137. Const WA_CLICKACTIVE = 2
  6138.  
  6139. Const WM_SETFOCUS = &H7
  6140. Const WM_KILLFOCUS = &H8
  6141. Const WM_ENABLE = &HA
  6142. Const WM_SETREDRAW = &HB
  6143. Const WM_SETTEXT = &HC
  6144. Const WM_GETTEXT = &HD
  6145. Const WM_GETTEXTLENGTH = &HE
  6146. Const WM_PAINT = &HF
  6147. Const WM_CLOSE = &H10
  6148. Const WM_QUERYENDSESSION = &H11
  6149. Const WM_QUIT = &H12
  6150. Const WM_QUERYOPEN = &H13
  6151. Const WM_ERASEBKGND = &H14
  6152. Const WM_SYSCOLORCHANGE = &H15
  6153. Const WM_ENDSESSION = &H16
  6154. Const WM_SHOWWINDOW = &H18
  6155. Const WM_WININICHANGE = &H1A
  6156. Const WM_DEVMODECHANGE = &H1B
  6157. Const WM_ACTIVATEAPP = &H1C
  6158. Const WM_FONTCHANGE = &H1D
  6159. Const WM_TIMECHANGE = &H1E
  6160. Const WM_CANCELMODE = &H1F
  6161. Const WM_SETCURSOR = &H20
  6162. Const WM_MOUSEACTIVATE = &H21
  6163. Const WM_CHILDACTIVATE = &H22
  6164. Const WM_QUEUESYNC = &H23
  6165.  
  6166. Const WM_GETMINMAXINFO = &H24
  6167.  
  6168. Type MINMAXINFO
  6169.         ptReserved As POINTAPI
  6170.         ptMaxSize As POINTAPI
  6171.         ptMaxPosition As POINTAPI
  6172.         ptMinTrackSize As POINTAPI
  6173.         ptMaxTrackSize As POINTAPI
  6174. End Type
  6175.  
  6176. Const WM_PAINTICON = &H26
  6177. Const WM_ICONERASEBKGND = &H27
  6178. Const WM_NEXTDLGCTL = &H28
  6179. Const WM_SPOOLERSTATUS = &H2A
  6180. Const WM_DRAWITEM = &H2B
  6181. Const WM_MEASUREITEM = &H2C
  6182. Const WM_DELETEITEM = &H2D
  6183. Const WM_VKEYTOITEM = &H2E
  6184. Const WM_CHARTOITEM = &H2F
  6185. Const WM_SETFONT = &H30
  6186. Const WM_GETFONT = &H31
  6187. Const WM_SETHOTKEY = &H32
  6188. Const WM_GETHOTKEY = &H33
  6189. Const WM_QUERYDRAGICON = &H37
  6190. Const WM_COMPAREITEM = &H39
  6191. Const WM_COMPACTING = &H41
  6192. Const WM_OTHERWINDOWCREATED = &H42               '  no longer suported
  6193. Const WM_OTHERWINDOWDESTROYED = &H43             '  no longer suported
  6194. Const WM_COMMNOTIFY = &H44                       '  no longer suported
  6195.  
  6196. ' notifications passed in low word of lParam on WM_COMMNOTIFY messages
  6197. Const CN_RECEIVE = &H1
  6198. Const CN_TRANSMIT = &H2
  6199. Const CN_EVENT = &H4
  6200.  
  6201. Const WM_WINDOWPOSCHANGING = &H46
  6202. Const WM_WINDOWPOSCHANGED = &H47
  6203.  
  6204. Const WM_POWER = &H48
  6205. '
  6206. '  wParam for WM_POWER window message and DRV_POWER driver notification
  6207.  
  6208. Const PWR_OK = 1
  6209. Const PWR_FAIL = (-1)
  6210. Const PWR_SUSPENDREQUEST = 1
  6211. Const PWR_SUSPENDRESUME = 2
  6212. Const PWR_CRITICALRESUME = 3
  6213.  
  6214. Const WM_COPYDATA = &H4A
  6215. Const WM_CANCELJOURNAL = &H4B
  6216.  
  6217. Type COPYDATASTRUCT
  6218.         dwData As Long
  6219.         cbData As Long
  6220.         lpData As Long
  6221. End Type
  6222.  
  6223. Const WM_NCCREATE = &H81
  6224. Const WM_NCDESTROY = &H82
  6225. Const WM_NCCALCSIZE = &H83
  6226. Const WM_NCHITTEST = &H84
  6227. Const WM_NCPAINT = &H85
  6228. Const WM_NCACTIVATE = &H86
  6229. Const WM_GETDLGCODE = &H87
  6230. Const WM_NCMOUSEMOVE = &HA0
  6231. Const WM_NCLBUTTONDOWN = &HA1
  6232. Const WM_NCLBUTTONUP = &HA2
  6233. Const WM_NCLBUTTONDBLCLK = &HA3
  6234. Const WM_NCRBUTTONDOWN = &HA4
  6235. Const WM_NCRBUTTONUP = &HA5
  6236. Const WM_NCRBUTTONDBLCLK = &HA6
  6237. Const WM_NCMBUTTONDOWN = &HA7
  6238. Const WM_NCMBUTTONUP = &HA8
  6239. Const WM_NCMBUTTONDBLCLK = &HA9
  6240.  
  6241. Const WM_KEYFIRST = &H100
  6242. Const WM_KEYDOWN = &H100
  6243. Const WM_KEYUP = &H101
  6244. Const WM_CHAR = &H102
  6245. Const WM_DEADCHAR = &H103
  6246. Const WM_SYSKEYDOWN = &H104
  6247. Const WM_SYSKEYUP = &H105
  6248. Const WM_SYSCHAR = &H106
  6249. Const WM_SYSDEADCHAR = &H107
  6250. Const WM_KEYLAST = &H108
  6251. Const WM_INITDIALOG = &H110
  6252. Const WM_COMMAND = &H111
  6253. Const WM_SYSCOMMAND = &H112
  6254. Const WM_TIMER = &H113
  6255. Const WM_HSCROLL = &H114
  6256. Const WM_VSCROLL = &H115
  6257. Const WM_INITMENU = &H116
  6258. Const WM_INITMENUPOPUP = &H117
  6259. Const WM_MENUSELECT = &H11F
  6260. Const WM_MENUCHAR = &H120
  6261. Const WM_ENTERIDLE = &H121
  6262.  
  6263. Const WM_CTLCOLORMSGBOX = &H132
  6264. Const WM_CTLCOLOREDIT = &H133
  6265. Const WM_CTLCOLORLISTBOX = &H134
  6266. Const WM_CTLCOLORBTN = &H135
  6267. Const WM_CTLCOLORDLG = &H136
  6268. Const WM_CTLCOLORSCROLLBAR = &H137
  6269. Const WM_CTLCOLORSTATIC = &H138
  6270.  
  6271. Const WM_MOUSEFIRST = &H200
  6272. Const WM_MOUSEMOVE = &H200
  6273. Const WM_LBUTTONDOWN = &H201
  6274. Const WM_LBUTTONUP = &H202
  6275. Const WM_LBUTTONDBLCLK = &H203
  6276. Const WM_RBUTTONDOWN = &H204
  6277. Const WM_RBUTTONUP = &H205
  6278. Const WM_RBUTTONDBLCLK = &H206
  6279. Const WM_MBUTTONDOWN = &H207
  6280. Const WM_MBUTTONUP = &H208
  6281. Const WM_MBUTTONDBLCLK = &H209
  6282. Const WM_MOUSELAST = &H209
  6283.  
  6284. Const WM_PARENTNOTIFY = &H210
  6285. Const WM_ENTERMENULOOP = &H211
  6286. Const WM_EXITMENULOOP = &H212
  6287. Const WM_MDICREATE = &H220
  6288. Const WM_MDIDESTROY = &H221
  6289. Const WM_MDIACTIVATE = &H222
  6290. Const WM_MDIRESTORE = &H223
  6291. Const WM_MDINEXT = &H224
  6292. Const WM_MDIMAXIMIZE = &H225
  6293. Const WM_MDITILE = &H226
  6294. Const WM_MDICASCADE = &H227
  6295. Const WM_MDIICONARRANGE = &H228
  6296. Const WM_MDIGETACTIVE = &H229
  6297. Const WM_MDISETMENU = &H230
  6298. Const WM_DROPFILES = &H233
  6299. Const WM_MDIREFRESHMENU = &H234
  6300.  
  6301.  
  6302. Const WM_CUT = &H300
  6303. Const WM_COPY = &H301
  6304. Const WM_PASTE = &H302
  6305. Const WM_CLEAR = &H303
  6306. Const WM_UNDO = &H304
  6307. Const WM_RENDERFORMAT = &H305
  6308. Const WM_RENDERALLFORMATS = &H306
  6309. Const WM_DESTROYCLIPBOARD = &H307
  6310. Const WM_DRAWCLIPBOARD = &H308
  6311. Const WM_PAINTCLIPBOARD = &H309
  6312. Const WM_VSCROLLCLIPBOARD = &H30A
  6313. Const WM_SIZECLIPBOARD = &H30B
  6314. Const WM_ASKCBFORMATNAME = &H30C
  6315. Const WM_CHANGECBCHAIN = &H30D
  6316. Const WM_HSCROLLCLIPBOARD = &H30E
  6317. Const WM_QUERYNEWPALETTE = &H30F
  6318. Const WM_PALETTEISCHANGING = &H310
  6319. Const WM_PALETTECHANGED = &H311
  6320. Const WM_HOTKEY = &H312
  6321.  
  6322. Const WM_PENWINFIRST = &H380
  6323. Const WM_PENWINLAST = &H38F
  6324.  
  6325. ' NOTE: All Message Numbers below 0x0400 are RESERVED.
  6326.  
  6327. ' Private Window Messages Start Here:
  6328. Const WM_USER = &H400
  6329.  
  6330. ' WM_SYNCTASK Commands
  6331. Const ST_BEGINSWP = 0
  6332. Const ST_ENDSWP = 1
  6333.  
  6334. ' WM_NCHITTEST and MOUSEHOOKSTRUCT Mouse Position Codes
  6335. Const HTERROR = (-2)
  6336. Const HTTRANSPARENT = (-1)
  6337. Const HTNOWHERE = 0
  6338. Const HTCLIENT = 1
  6339. Const HTCAPTION = 2
  6340. Const HTSYSMENU = 3
  6341. Const HTGROWBOX = 4
  6342. Const HTSIZE = HTGROWBOX
  6343. Const HTMENU = 5
  6344. Const HTHSCROLL = 6
  6345. Const HTVSCROLL = 7
  6346. Const HTMINBUTTON = 8
  6347. Const HTMAXBUTTON = 9
  6348. Const HTLEFT = 10
  6349. Const HTRIGHT = 11
  6350. Const HTTOP = 12
  6351. Const HTTOPLEFT = 13
  6352. Const HTTOPRIGHT = 14
  6353. Const HTBOTTOM = 15
  6354. Const HTBOTTOMLEFT = 16
  6355. Const HTBOTTOMRIGHT = 17
  6356. Const HTBORDER = 18
  6357. Const HTREDUCE = HTMINBUTTON
  6358. Const HTZOOM = HTMAXBUTTON
  6359. Const HTSIZEFIRST = HTLEFT
  6360. Const HTSIZELAST = HTBOTTOMRIGHT
  6361.  
  6362. '  SendMessageTimeout values
  6363. Const SMTO_NORMAL = &H0
  6364. Const SMTO_BLOCK = &H1
  6365. Const SMTO_ABORTIFHUNG = &H2
  6366.  
  6367. ' WM_MOUSEACTIVATE Return Codes
  6368. Const MA_ACTIVATE = 1
  6369. Const MA_ACTIVATEANDEAT = 2
  6370. Const MA_NOACTIVATE = 3
  6371. Const MA_NOACTIVATEANDEAT = 4
  6372.  
  6373. Declare Function RegisterWindowMessage Lib "user32" Alias "RegisterWindowMessageA" (ByVal lpString As String) As Long
  6374.  
  6375. ' WM_SIZE message wParam values
  6376. Const SIZE_RESTORED = 0
  6377. Const SIZE_MINIMIZED = 1
  6378. Const SIZE_MAXIMIZED = 2
  6379. Const SIZE_MAXSHOW = 3
  6380. Const SIZE_MAXHIDE = 4
  6381.  
  6382. ' Obsolete constant names
  6383. Const SIZENORMAL = SIZE_RESTORED
  6384. Const SIZEICONIC = SIZE_MINIMIZED
  6385. Const SIZEFULLSCREEN = SIZE_MAXIMIZED
  6386. Const SIZEZOOMSHOW = SIZE_MAXSHOW
  6387. Const SIZEZOOMHIDE = SIZE_MAXHIDE
  6388.  
  6389. ' WM_WINDOWPOSCHANGING/CHANGED struct pointed to by lParam
  6390. Type WINDOWPOS
  6391.         hwnd As Long
  6392.         hWndInsertAfter As Long
  6393.         x As Long
  6394.         y As Long
  6395.         cx As Long
  6396.         cy As Long
  6397.         flags As Long
  6398. End Type
  6399.  
  6400. ' WM_NCCALCSIZE return flags
  6401. Const WVR_ALIGNTOP = &H10
  6402. Const WVR_ALIGNLEFT = &H20
  6403. Const WVR_ALIGNBOTTOM = &H40
  6404. Const WVR_ALIGNRIGHT = &H80
  6405. Const WVR_HREDRAW = &H100
  6406. Const WVR_VREDRAW = &H200
  6407. Const WVR_REDRAW = (WVR_HREDRAW Or WVR_VREDRAW)
  6408. Const WVR_VALIDRECTS = &H400
  6409.  
  6410. ' Key State Masks for Mouse Messages
  6411. Const MK_LBUTTON = &H1
  6412. Const MK_RBUTTON = &H2
  6413. Const MK_SHIFT = &H4
  6414. Const MK_CONTROL = &H8
  6415. Const MK_MBUTTON = &H10
  6416.  
  6417. ' Window Styles
  6418. Const WS_OVERLAPPED = &H0&
  6419. Const WS_POPUP = &H80000000
  6420. Const WS_CHILD = &H40000000
  6421. Const WS_MINIMIZE = &H20000000
  6422. Const WS_VISIBLE = &H10000000
  6423. Const WS_DISABLED = &H8000000
  6424. Const WS_CLIPSIBLINGS = &H4000000
  6425. Const WS_CLIPCHILDREN = &H2000000
  6426. Const WS_MAXIMIZE = &H1000000
  6427. Const WS_CAPTION = &HC00000                  '  WS_BORDER Or WS_DLGFRAME
  6428. Const WS_BORDER = &H800000
  6429. Const WS_DLGFRAME = &H400000
  6430. Const WS_VSCROLL = &H200000
  6431. Const WS_HSCROLL = &H100000
  6432. Const WS_SYSMENU = &H80000
  6433. Const WS_THICKFRAME = &H40000
  6434. Const WS_GROUP = &H20000
  6435. Const WS_TABSTOP = &H10000
  6436.  
  6437. Const WS_MINIMIZEBOX = &H20000
  6438. Const WS_MAXIMIZEBOX = &H10000
  6439.  
  6440. Const WS_TILED = WS_OVERLAPPED
  6441. Const WS_ICONIC = WS_MINIMIZE
  6442. Const WS_SIZEBOX = WS_THICKFRAME
  6443. Const WS_OVERLAPPEDWINDOW = (WS_OVERLAPPED Or WS_CAPTION Or WS_SYSMENU Or WS_THICKFRAME Or WS_MINIMIZEBOX Or WS_MAXIMIZEBOX)
  6444. Const WS_TILEDWINDOW = WS_OVERLAPPEDWINDOW
  6445.  
  6446. '
  6447. '   Common Window Styles
  6448. '  /
  6449.  
  6450.  
  6451. Const WS_POPUPWINDOW = (WS_POPUP Or WS_BORDER Or WS_SYSMENU)
  6452.  
  6453. Const WS_CHILDWINDOW = (WS_CHILD)
  6454.  
  6455. ' Extended Window Styles
  6456. Const WS_EX_DLGMODALFRAME = &H1&
  6457. Const WS_EX_NOPARENTNOTIFY = &H4&
  6458. Const WS_EX_TOPMOST = &H8&
  6459. Const WS_EX_ACCEPTFILES = &H10&
  6460. Const WS_EX_TRANSPARENT = &H20&
  6461.  
  6462. ' Class styles
  6463. Const CS_VREDRAW = &H1
  6464. Const CS_HREDRAW = &H2
  6465. Const CS_KEYCVTWINDOW = &H4
  6466. Const CS_DBLCLKS = &H8
  6467. Const CS_OWNDC = &H20
  6468. Const CS_CLASSDC = &H40
  6469. Const CS_PARENTDC = &H80
  6470. Const CS_NOKEYCVT = &H100
  6471. Const CS_NOCLOSE = &H200
  6472. Const CS_SAVEBITS = &H800
  6473. Const CS_BYTEALIGNCLIENT = &H1000
  6474. Const CS_BYTEALIGNWINDOW = &H2000
  6475. Const CS_PUBLICCLASS = &H4000
  6476.  
  6477. ' Predefined Clipboard Formats
  6478. Const CF_TEXT = 1
  6479. Const CF_BITMAP = 2
  6480. Const CF_METAFILEPICT = 3
  6481. Const CF_SYLK = 4
  6482. Const CF_DIF = 5
  6483. Const CF_TIFF = 6
  6484. Const CF_OEMTEXT = 7
  6485. Const CF_DIB = 8
  6486. Const CF_PALETTE = 9
  6487. Const CF_PENDATA = 10
  6488. Const CF_RIFF = 11
  6489. Const CF_WAVE = 12
  6490. Const CF_UNICODETEXT = 13
  6491. Const CF_ENHMETAFILE = 14
  6492.  
  6493. Const CF_OWNERDISPLAY = &H80
  6494. Const CF_DSPTEXT = &H81
  6495. Const CF_DSPBITMAP = &H82
  6496. Const CF_DSPMETAFILEPICT = &H83
  6497. Const CF_DSPENHMETAFILE = &H8E
  6498.  
  6499. ' "Private" formats don't get GlobalFree()'d
  6500. Const CF_PRIVATEFIRST = &H200
  6501. Const CF_PRIVATELAST = &H2FF
  6502.  
  6503. ' "GDIOBJ" formats do get DeleteObject()'d
  6504. Const CF_GDIOBJFIRST = &H300
  6505. Const CF_GDIOBJLAST = &H3FF
  6506.  
  6507. '  Defines for the fVirt field of the Accelerator table structure.
  6508. Const FVIRTKEY = True          '  Assumed to be == TRUE
  6509. Const FNOINVERT = &H2
  6510. Const FSHIFT = &H4
  6511. Const FCONTROL = &H8
  6512. Const FALT = &H10
  6513.  
  6514. Type ACCEL
  6515.         fVirt As Byte
  6516.         key As Integer
  6517.         cmd As Integer
  6518. End Type
  6519.  
  6520. Type PAINTSTRUCT
  6521.         hdc As Long
  6522.         fErase As Long
  6523.         rcPaint As Rect
  6524.         fRestore As Long
  6525.         fIncUpdate As Long
  6526.         rgbReserved(32) As Byte
  6527. End Type
  6528.  
  6529. Type CREATESTRUCT
  6530.         lpCreateParams As Long
  6531.         hInstance As Long
  6532.         hMenu As Long
  6533.         hWndParent As Long
  6534.         cy As Long
  6535.         cx As Long
  6536.         y As Long
  6537.         x As Long
  6538.         style As Long
  6539.         lpszName As String
  6540.         lpszClass As String
  6541.         ExStyle As Long
  6542. End Type
  6543.  
  6544. ' HCBT_CREATEWND parameters pointed to by lParam
  6545. Type CBT_CREATEWND
  6546.         lpcs As CREATESTRUCT
  6547.         hWndInsertAfter As Long
  6548. End Type
  6549.  
  6550. Type WINDOWPLACEMENT
  6551.         Length As Long
  6552.         flags As Long
  6553.         showCmd As Long
  6554.         ptMinPosition As POINTAPI
  6555.         ptMaxPosition As POINTAPI
  6556.         rcNormalPosition As Rect
  6557. End Type
  6558.  
  6559. Const WPF_SETMINPOSITION = &H1
  6560. Const WPF_RESTORETOMAXIMIZED = &H2
  6561.  
  6562. ' Owner draw control types
  6563. Const ODT_MENU = 1
  6564. Const ODT_LISTBOX = 2
  6565. Const ODT_COMBOBOX = 3
  6566. Const ODT_BUTTON = 4
  6567.  
  6568. ' Owner draw actions
  6569. Const ODA_DRAWENTIRE = &H1
  6570. Const ODA_SELECT = &H2
  6571. Const ODA_FOCUS = &H4
  6572.  
  6573. ' Owner draw state
  6574. Const ODS_SELECTED = &H1
  6575. Const ODS_GRAYED = &H2
  6576. Const ODS_DISABLED = &H4
  6577. Const ODS_CHECKED = &H8
  6578. Const ODS_FOCUS = &H10
  6579.  
  6580. ' MEASUREITEMSTRUCT for ownerdraw
  6581. Type MEASUREITEMSTRUCT
  6582.         CtlType As Long
  6583.         CtlID As Long
  6584.         itemID As Long
  6585.         itemWidth As Long
  6586.         itemHeight As Long
  6587.         itemData As Long
  6588. End Type
  6589.  
  6590. ' DRAWITEMSTRUCT for ownerdraw
  6591. Type DRAWITEMSTRUCT
  6592.         CtlType As Long
  6593.         CtlID As Long
  6594.         itemID As Long
  6595.         itemAction As Long
  6596.         itemState As Long
  6597.         hwndItem As Long
  6598.         hdc As Long
  6599.         rcItem As Rect
  6600.         itemData As Long
  6601. End Type
  6602.  
  6603. ' DELETEITEMSTRUCT for ownerdraw
  6604. Type DELETEITEMSTRUCT
  6605.         CtlType As Long
  6606.         CtlID As Long
  6607.         itemID As Long
  6608.         hwndItem As Long
  6609.         itemData As Long
  6610. End Type
  6611.  
  6612. ' COMPAREITEMSTRUCT for ownerdraw sorting
  6613. Type COMPAREITEMSTRUCT
  6614.         CtlType As Long
  6615.         CtlID As Long
  6616.         hwndItem As Long
  6617.         itemID1 As Long
  6618.         itemData1 As Long
  6619.         itemID2 As Long
  6620.         itemData2 As Long
  6621. End Type
  6622.  
  6623. ' Message Function Templates
  6624. Declare Function GetMessage Lib "user32" Alias "GetMessageA" (lpMsg As MSG, ByVal hwnd As Long, ByVal wMsgFilterMin As Long, ByVal wMsgFilterMax As Long) As Long
  6625. Declare Function TranslateMessage Lib "user32" Alias "TranslateMessage" (lpMsg As MSG) As Long
  6626. Declare Function DispatchMessage Lib "user32" Alias "DispatchMessageA" (lpMsg As MSG) As Long
  6627. Declare Function PeekMessage Lib "user32" Alias "PeekMessageA" (lpMsg As MSG, ByVal hwnd As Long, ByVal wMsgFilterMin As Long, ByVal wMsgFilterMax As Long, ByVal wRemoveMsg As Long) As Long
  6628.  
  6629. ' PeekMessage() Options
  6630. Const PM_NOREMOVE = &H0
  6631. Const PM_REMOVE = &H1
  6632. Const PM_NOYIELD = &H2
  6633.  
  6634. Declare Function RegisterHotKey Lib "user32" Alias "RegisterHotKey" (ByVal hwnd As Long, ByVal id As Long, ByVal fsModifiers As Long, ByVal vk As Long) As Long
  6635. Declare Function UnregisterHotKey Lib "user32" Alias "UnregisterHotKey" (ByVal hwnd As Long, ByVal id As Long) As Long
  6636.  
  6637. Const MOD_ALT = &H1
  6638. Const MOD_CONTROL = &H2
  6639. Const MOD_SHIFT = &H4
  6640.  
  6641. Const IDHOT_SNAPWINDOW = (-1)    '  SHIFT-PRINTSCRN
  6642. Const IDHOT_SNAPDESKTOP = (-2)    '  PRINTSCRN
  6643.  
  6644. Const EWX_LOGOFF = 0
  6645. Const EWX_SHUTDOWN = 1
  6646. Const EWX_REBOOT = 2
  6647. Const EWX_FORCE = 4
  6648.  
  6649. Const READAPI = 0        '  Flags for _lopen
  6650. Const WRITEAPI = 1
  6651. Const READ_WRITE = 2
  6652.  
  6653. Declare Function ExitWindows Lib "user32" Alias "ExitWindows" (ByVal dwReserved As Long, ByVal uReturnCode As Long) As Long
  6654. Declare Function ExitWindowsEx Lib "user32" Alias "ExitWindowsEx" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
  6655.  
  6656. Declare Function SwapMouseButton Lib "user32" Alias "SwapMouseButton" (ByVal bSwap As Long) As Long
  6657. Declare Function GetMessagePos Lib "user32" Alias "GetMessagePos" () As Long
  6658. Declare Function GetMessageTime Lib "user32" Alias "GetMessageTime" () As Long
  6659. Declare Function GetMessageExtraInfo Lib "user32" Alias "GetMessageExtraInfo" () As Long
  6660. Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
  6661. Declare Function SendMessageTimeout Lib "user32" Alias "SendMessageTimeoutA" (ByVal hwnd As Long, ByVal msg As Long, ByVal wParam As Long, ByVal lParam As Long, ByVal fuFlags As Long, ByVal uTimeout As Long, lpdwResult As Long) As Long
  6662. Declare Function SendNotifyMessage Lib "user32" Alias "SendNotifyMessageA" (ByVal hwnd As Long, ByVal msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
  6663. Declare Function SendMessageCallback Lib "user32" Alias "SendMessageCallbackA" (ByVal hwnd As Long, ByVal msg As Long, ByVal wParam As Long, ByVal lParam As Long, ByVal lpResultCallBack As Long, ByVal dwData As Long) As Long
  6664. Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
  6665. Declare Function PostThreadMessage Lib "user32" Alias "PostThreadMessageA" (ByVal idThread As Long, ByVal msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
  6666.  
  6667. ' Special HWND value for use with PostMessage and SendMessage
  6668. Const HWND_BROADCAST = &HFFFF&
  6669.  
  6670.  
  6671. Type WNDCLASS
  6672.     style As Long
  6673.     lpfnwndproc As Long
  6674.     cbClsextra As Long
  6675.     cbWndExtra2 As Long
  6676.     hInstance As Long
  6677.     hIcon As Long
  6678.     hCursor As Long
  6679.     hbrBackground As Long
  6680.     lpszMenuName As String
  6681.     lpszClassName As String
  6682. End Type
  6683.  
  6684. Declare Function AttachThreadInput Lib "user32" Alias "AttachThreadInput" (ByVal idAttach As Long, ByVal idAttachTo As Long, ByVal fAttach As Long) As Long
  6685. Declare Function ReplyMessage Lib "user32" Alias "ReplyMessage" (ByVal lReply As Long) As Long
  6686. Declare Function WaitMessage Lib "user32" Alias "WaitMessage" () As Long
  6687. Declare Function WaitForInputIdle Lib "user32" Alias "WaitForInputIdle" (ByVal hProcess As Long, ByVal dwMilliseconds As Long) As Long
  6688. Declare Function DefWindowProc Lib "user32" Alias "DefWindowProcA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
  6689. Declare Sub PostQuitMessage Lib "user32" Alias "PostQuitMessage" (ByVal nExitCode As Long)
  6690. Declare Function InSendMessage Lib "user32" Alias "InSendMessage" () As Long
  6691.  
  6692. Private Declare Function InitCommonControls Lib "COMCTL32" () As Long
  6693. Private Declare Function ImageList_Create Lib "COMCTL32" (ByVal MinCx As Long, ByVal MinCy As Long, ByVal flags As Long, ByVal cInitial As Long, ByVal cGrow As Long) As Long
  6694. Private Declare Function ImageList_AddIcon Lib "COMCTL32" (ByVal himl As Long, ByVal hIcon As Long) As Long
  6695. Private Declare Function ImageList_GetIcon Lib "COMCTL32" (ByVal HIMAGELIST As Long, ByVal ImgIndex As Long, hbmMask As Long) As Long
  6696. Private Declare Function ImageList_Draw Lib "COMCTL32" (ByVal HIMAGELIST As Long, ByVal ImgIndex As Long, ByVal hDCDest As Long, ByVal xDest As Long, ByVal yDest As Long, ByVal lStyle As Long) As Long
  6697.  
  6698.  
  6699.  
  6700.  
  6701. Declare Function GetDoubleClickTime Lib "user32" Alias "GetDoubleClickTime" () As Long
  6702. Declare Function SetDoubleClickTime Lib "user32" Alias "SetDoubleClickTime" (ByVal wCount As Long) As Long
  6703. Declare Function RegisterClass Lib "user32" Alias "RegisterClassA" (Class As WNDCLASS) As Long
  6704. Declare Function UnregisterClass Lib "user32" Alias "UnregisterClassA" (ByVal lpClassName As String, ByVal hInstance As Long) As Long
  6705. Declare Function GetClassInfo Lib "user32" Alias "GetClassInfoA" (ByVal hInstance As Long, ByVal lpClassName As String, lpWndClass As WNDCLASS) As Long
  6706.  
  6707. Const CW_USEDEFAULT = &H80000000
  6708. Const HWND_DESKTOP = 0
  6709.  
  6710. Declare Function CreateWindowEx Lib "user32" Alias "CreateWindowExA" (ByVal dwExStyle As Long, ByVal lpClassName As String, ByVal lpWindowName As String, ByVal dwStyle As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hWndParent As Long, ByVal hMenu As Long, ByVal hInstance As Long, lpParam As Any) As Long
  6711. Declare Function IsWindow Lib "user32" Alias "IsWindow" (ByVal hwnd As Long) As Long
  6712. Declare Function IsMenu Lib "user32" Alias "IsMenu" (ByVal hMenu As Long) As Long
  6713. Declare Function IsChild Lib "user32" Alias "IsChild" (ByVal hWndParent As Long, ByVal hwnd As Long) As Long
  6714. Declare Function DestroyWindow Lib "user32" Alias "DestroyWindow" (ByVal hwnd As Long) As Long
  6715.  
  6716. Declare Function ShowWindow Lib "user32" Alias "ShowWindow" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
  6717. Declare Function FlashWindow Lib "user32" Alias "FlashWindow" (ByVal hwnd As Long, ByVal bInvert As Long) As Long
  6718. Declare Function ShowOwnedPopups Lib "user32" Alias "ShowOwnedPopups" (ByVal hwnd As Long, ByVal fShow As Long) As Long
  6719.  
  6720. Declare Function OpenIcon Lib "user32" Alias "OpenIcon" (ByVal hwnd As Long) As Long
  6721. Declare Function CloseWindow Lib "user32" Alias "CloseWindow" (ByVal hwnd As Long) As Long
  6722. Declare Function MoveWindow Lib "user32" Alias "MoveWindow" (ByVal hwnd As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal bRepaint As Long) As Long
  6723. Declare Function SetWindowPos Lib "user32" Alias "SetWindowPos" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
  6724. Declare Function GetWindowPlacement Lib "user32" Alias "GetWindowPlacement" (ByVal hwnd As Long, lpwndpl As WINDOWPLACEMENT) As Long
  6725. Declare Function SetWindowPlacement Lib "user32" Alias "SetWindowPlacement" (ByVal hwnd As Long, lpwndpl As WINDOWPLACEMENT) As Long
  6726.  
  6727. Declare Function BeginDeferWindowPos Lib "user32" Alias "BeginDeferWindowPos" (ByVal nNumWindows As Long) As Long
  6728. Declare Function DeferWindowPos Lib "user32" Alias "DeferWindowPos" (ByVal hWinPosInfo As Long, ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
  6729. Declare Function EndDeferWindowPos Lib "user32" Alias "EndDeferWindowPos" (ByVal hWinPosInfo As Long) As Long
  6730.  
  6731. Declare Function IsWindowVisible Lib "user32" Alias "IsWindowVisible" (ByVal hwnd As Long) As Long
  6732. Declare Function IsIconic Lib "user32" Alias "IsIconic" (ByVal hwnd As Long) As Long
  6733. Declare Function AnyPopup Lib "user32" Alias "AnyPopup" () As Long
  6734. Declare Function BringWindowToTop Lib "user32" Alias "BringWindowToTop" (ByVal hwnd As Long) As Long
  6735. Declare Function IsZoomed Lib "user32" Alias "IsZoomed" (ByVal hwnd As Long) As Long
  6736.  
  6737. ' SetWindowPos Flags
  6738. Const SWP_NOSIZE = &H1
  6739. Const SWP_NOMOVE = &H2
  6740. Const SWP_NOZORDER = &H4
  6741. Const SWP_NOREDRAW = &H8
  6742. Const SWP_NOACTIVATE = &H10
  6743. Const SWP_FRAMECHANGED = &H20        '  The frame changed: send WM_NCCALCSIZE
  6744. Const SWP_SHOWWINDOW = &H40
  6745. Const SWP_HIDEWINDOW = &H80
  6746. Const SWP_NOCOPYBITS = &H100
  6747. Const SWP_NOOWNERZORDER = &H200      '  Don't do owner Z ordering
  6748.  
  6749. Const SWP_DRAWFRAME = SWP_FRAMECHANGED
  6750. Const SWP_NOREPOSITION = SWP_NOOWNERZORDER
  6751.  
  6752. ' SetWindowPos() hwndInsertAfter values
  6753. Const HWND_TOP = 0
  6754. Const HWND_BOTTOM = 1
  6755. Const HWND_TOPMOST = -1
  6756. Const HWND_NOTOPMOST = -2
  6757.  
  6758. Type DLGTEMPLATE
  6759.         style As Long
  6760.         dwExtendedStyle As Long
  6761.         cdit As Integer
  6762.         x As Integer
  6763.         y As Integer
  6764.         cx As Integer
  6765.         cy As Integer
  6766. End Type
  6767.  
  6768. Type DLGITEMTEMPLATE
  6769.         style As Long
  6770.         dwExtendedStyle As Long
  6771.         x As Integer
  6772.         y As Integer
  6773.         cx As Integer
  6774.         cy As Integer
  6775.         id As Integer
  6776. End Type
  6777.  
  6778. Declare Function EndDialog Lib "user32" Alias "EndDialog" (ByVal hDlg As Long, ByVal nResult As Long) As Long
  6779. Declare Function GetDlgItem Lib "user32" Alias "GetDlgItem" (ByVal hDlg As Long, ByVal nIDDlgItem As Long) As Long
  6780. Declare Function SetDlgItemInt Lib "user32" Alias "SetDlgItemInt" (ByVal hDlg As Long, ByVal nIDDlgItem As Long, ByVal wValue As Long, ByVal bSigned As Long) As Long
  6781. Declare Function GetDlgItemInt Lib "user32" Alias "GetDlgItemInt" (ByVal hDlg As Long, ByVal nIDDlgItem As Long, ByVal lpTranslated As Long, ByVal bSigned As Long) As Long
  6782. Declare Function SetDlgItemText Lib "user32" Alias "SetDlgItemTextA" (ByVal hDlg As Long, ByVal nIDDlgItem As Long, ByVal lpString As String) As Long
  6783. Declare Function GetDlgItemText Lib "user32" Alias "GetDlgItemTextA" (ByVal hDlg As Long, ByVal nIDDlgItem As Long, ByVal lpString As String, ByVal nMaxCount As Long) As Long
  6784. Declare Function CheckDlgButton Lib "user32" Alias "CheckDLGButtonA" (ByVal hDlg As Long, ByVal nIDButton As Long, ByVal wCheck As Long) As Long
  6785. Declare Function CheckRadioButton Lib "user32" Alias "CheckRadioButtonA" (ByVal hDlg As Long, ByVal nIDFirstButton As Long, ByVal nIDLastButton As Long, ByVal nIDCheckButton As Long) As Long
  6786. Declare Function IsDlgButtonChecked Lib "user32" Alias "IsDlgButtonChecked" (ByVal hDlg As Long, ByVal nIDButton As Long) As Long
  6787. Declare Function SendDlgItemMessage Lib "user32" Alias "SendDlgItemMessageA" (ByVal hDlg As Long, ByVal nIDDlgItem As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
  6788. Declare Function GetNextDlgGroupItem Lib "user32" Alias "GetNextDlgGroupItem" (ByVal hDlg As Long, ByVal hCtl As Long, ByVal bPrevious As Long) As Long
  6789. Declare Function GetNextDlgTabItem Lib "user32" Alias "GetNextDlgTabItem" (ByVal hDlg As Long, ByVal hCtl As Long, ByVal bPrevious As Long) As Long
  6790. Declare Function GetDlgCtrlID Lib "user32" Alias "GetDlgCtrlID" (ByVal hwnd As Long) As Long
  6791. Declare Function GetDialogBaseUnits Lib "user32" Alias "GetDialogBaseUnits" () As Long
  6792. Declare Function DefDlgProc Lib "user32" Alias "DefDlgProcA" (ByVal hDlg As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
  6793.  
  6794. Const DLGWINDOWEXTRA = 30        '  Window extra bytes needed for private dialog classes
  6795.  
  6796. Declare Function CallMsgFilter Lib "user32" Alias "CallMsgFilterA" (lpMsg As MSG, ByVal ncode As Long) As Long
  6797.  
  6798. ' Clipboard Manager Functions
  6799. Declare Function OpenClipboard Lib "user32" Alias "OpenClipboard" (ByVal hwnd As Long) As Long
  6800. Declare Function CloseClipboard Lib "user32" Alias "CloseClipboard" () As Long
  6801. Declare Function GetClipboardOwner Lib "user32" Alias "GetClipboardOwner" () As Long
  6802. Declare Function SetClipboardViewer Lib "user32" Alias "SetClipboardViewer" (ByVal hwnd As Long) As Long
  6803. Declare Function GetClipboardViewer Lib "user32" Alias "GetClipboardViewer" () As Long
  6804. Declare Function ChangeClipboardChain Lib "user32" Alias "ChangeClipboardChain" (ByVal hwnd As Long, ByVal hWndNext As Long) As Long
  6805. Declare Function SetClipboardData Lib "user32" Alias "SetClipboardDataA" (ByVal wFormat As Long, ByVal hMem As Long) As Long
  6806. Declare Function GetClipboardData Lib "user32" Alias "GetClipboardDataA" (ByVal wFormat As Long) As Long
  6807. Declare Function RegisterClipboardFormat Lib "user32" Alias "RegisterClipboardFormatA" (ByVal lpString As String) As Long
  6808. Declare Function CountClipboardFormats Lib "user32" Alias "CountClipboardFormats" () As Long
  6809. Declare Function EnumClipboardFormats Lib "user32" Alias "EnumClipboardFormats" (ByVal wFormat As Long) As Long
  6810. Declare Function GetClipboardFormatName Lib "user32" Alias "GetClipboardFormatNameA" (ByVal wFormat As Long, ByVal lpString As String, ByVal nMaxCount As Long) As Long
  6811. Declare Function EmptyClipboard Lib "user32" Alias "EmptyClipboard" () As Long
  6812. Declare Function IsClipboardFormatAvailable Lib "user32" Alias "IsClipboardFormatAvailable" (ByVal wFormat As Long) As Long
  6813. Declare Function GetPriorityClipboardFormat Lib "user32" Alias "GetPriorityClipboardFormat" (lpPriorityList As Long, ByVal nCount As Long) As Long
  6814. Declare Function GetOpenClipboardWindow Lib "user32" Alias "GetOpenClipboardWindow" () As Long
  6815. Declare Function CharToOem Lib "user32" Alias "CharToOemA" (ByVal lpszSrc As String, ByVal lpszDst As String) As Long
  6816. Declare Function OemToChar Lib "user32" Alias "OemToCharA" (ByVal lpszSrc As String, ByVal lpszDst As String) As Long
  6817. Declare Function CharToOemBuff Lib "user32" Alias "CharToOemBuffA" (ByVal lpszSrc As String, ByVal lpszDst As String, ByVal cchDstLength As Long) As Long
  6818. Declare Function OemToCharBuff Lib "user32" Alias "OemToCharBuffA" (ByVal lpszSrc As String, ByVal lpszDst As String, ByVal cchDstLength As Long) As Long
  6819. Declare Function CharUpper Lib "user32" Alias "CharUpperA" (ByVal lpsz As String) As String
  6820. Declare Function CharUpperBuff Lib "user32" Alias "CharUpperBuffA" (ByVal lpsz As String, ByVal cchLength As Long) As Long
  6821. Declare Function CharLower Lib "user32" Alias "CharLowerA" (ByVal lpsz As String) As String
  6822. Declare Function CharLowerBuff Lib "user32" Alias "CharLowerBuffA" (ByVal lpsz As String, ByVal cchLength As Long) As Long
  6823. Declare Function CharNext Lib "user32" Alias "CharNextA" (ByVal lpsz As String) As String
  6824. Declare Function CharPrev Lib "user32" Alias "CharPrevA" (ByVal lpszStart As String, ByVal lpszCurrent As String) As String
  6825.  
  6826. ' Language dependent Routines
  6827. Declare Function IsCharAlpha Lib "user32" Alias "IsCharAlphaA" (ByVal cChar As Byte) As Long
  6828. Declare Function IsCharAlphaNumeric Lib "user32" Alias "IsCharAlphaNumericA" (ByVal cChar As Byte) As Long
  6829. Declare Function IsCharUpper Lib "user32" Alias "IsCharUpperA" (ByVal cChar As Byte) As Long
  6830. Declare Function IsCharLower Lib "user32" Alias "IsCharLowerA" (ByVal cChar As Byte) As Long
  6831.  
  6832. Declare Function SetFocus Lib "user32" Alias "SetFocus" (ByVal hwnd As Long) As Long
  6833. Declare Function GetFocus Lib "user32" Alias "GetFocus" () As Long
  6834. Declare Function GetActiveWindow Lib "user32" Alias "GetActiveWindow" () As Long
  6835.  
  6836. ' Keyboard Information Routines
  6837. Declare Function GetKBCodePage Lib "user32" Alias "GetKBCodePage" () As Long
  6838. Declare Function GetKeyState Lib "user32" Alias "GetKeyState" (ByVal nVirtKey As Long) As Integer
  6839. Declare Function GetAsyncKeyState Lib "user32" Alias "GetAsyncKeyState" (ByVal vKey As Long) As Integer
  6840. Declare Function GetKeyboardState Lib "user32" Alias "GetKeyboardState" (pbKeyState As Byte) As Long
  6841. Declare Function SetKeyboardState Lib "user32" Alias "SetKeyboardState" (lppbKeyState As Byte) As Long
  6842. Declare Function GetKeyboardType Lib "user32" Alias "GetKeyboardType" (ByVal nTypeFlag As Long) As Long
  6843. Declare Function GetKeyNameText Lib "user32" Alias "GetKeyNameTextA" (ByVal lParam As Long, ByVal lpBuffer As String, ByVal nSize As Long) As Long
  6844.  
  6845. Declare Function ToAscii Lib "user32" Alias "ToAscii" (ByVal uVirtKey As Long, ByVal uScanCode As Long, lpbKeyState As Byte, lpwTransKey As Long, ByVal fuState As Long) As Long
  6846. Declare Function ToUnicode Lib "user32" Alias "ToUnicode" (ByVal wVirtKey As Long, ByVal wScanCode As Long, lpKeyState As Byte, ByVal pwszBuff As String, ByVal cchBuff As Long, ByVal wFlags As Long) As Long
  6847.  
  6848. Declare Function OemKeyScan Lib "user32" Alias "OemKeyScan" (ByVal wOemChar As Long) As Long
  6849. Declare Function VkKeyScan Lib "user32" Alias "VkKeyScanA" (ByVal cChar As Byte) As Integer
  6850.  
  6851. Const KEYEVENTF_EXTENDEDKEY = &H1
  6852. Const KEYEVENTF_KEYUP = &H2
  6853.  
  6854. Declare Sub keybd_event Lib "user32" Alias "keybd_event" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
  6855.  
  6856. Const MOUSEEVENTF_MOVE = &H1 '  mouse move
  6857. Const MOUSEEVENTF_LEFTDOWN = &H2 '  left button down
  6858. Const MOUSEEVENTF_LEFTUP = &H4 '  left button up
  6859. Const MOUSEEVENTF_RIGHTDOWN = &H8 '  right button down
  6860. Const MOUSEEVENTF_RIGHTUP = &H10 '  right button up
  6861. Const MOUSEEVENTF_MIDDLEDOWN = &H20 '  middle button down
  6862. Const MOUSEEVENTF_MIDDLEUP = &H40 '  middle button up
  6863. Const MOUSEEVENTF_ABSOLUTE = &H8000 '  absolute move
  6864.  
  6865. Declare Sub mouse_event Lib "user32" Alias "mouse_event" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)
  6866. Declare Function MapVirtualKey Lib "user32" Alias "MapVirtualKeyA" (ByVal wCode As Long, ByVal wMapType As Long) As Long
  6867.  
  6868. Declare Function GetInputState Lib "user32" Alias "GetInputState" () As Long
  6869. Declare Function GetQueueStatus Lib "user32" Alias "GetQueueStatus" (ByVal fuFlags As Long) As Long
  6870. Declare Function GetCapture Lib "user32" Alias "GetCapture" () As Long
  6871. Declare Function SetCapture Lib "user32" Alias "SetCapture" (ByVal hwnd As Long) As Long
  6872. Declare Function ReleaseCapture Lib "user32" Alias "ReleaseCapture" () As Long
  6873.  
  6874. Declare Function MsgWaitForMultipleObjects Lib "user32" Alias "MsgWaitForMultipleObjects" (ByVal nCount As Long, pHandles As Long, ByVal fWaitAll As Long, ByVal dwMilliseconds As Long, ByVal dwWakeMask As Long) As Long
  6875.  
  6876. ' GetQueueStatus flags
  6877. Const QS_KEY = &H1
  6878. Const QS_MOUSEMOVE = &H2
  6879. Const QS_MOUSEBUTTON = &H4
  6880. Const QS_POSTMESSAGE = &H8
  6881. Const QS_TIMER = &H10
  6882. Const QS_PAINT = &H20
  6883. Const QS_SENDMESSAGE = &H40
  6884. Const QS_HOTKEY = &H80
  6885.  
  6886. Const QS_MOUSE = (QS_MOUSEMOVE Or QS_MOUSEBUTTON)
  6887.  
  6888. Const QS_INPUT = (QS_MOUSE Or QS_KEY)
  6889.  
  6890. Const QS_ALLEVENTS = (QS_INPUT Or QS_POSTMESSAGE Or QS_TIMER Or QS_PAINT Or QS_HOTKEY)
  6891.  
  6892. Const QS_ALLINPUT = (QS_SENDMESSAGE Or QS_PAINT Or QS_TIMER Or QS_POSTMESSAGE Or QS_MOUSEBUTTON Or QS_MOUSEMOVE Or QS_HOTKEY Or QS_KEY)
  6893.  
  6894. ' Windows Functions
  6895. Declare Function KillTimer Lib "user32" Alias "KillTimer" (ByVal hwnd As Long, ByVal nIDEvent As Long) As Long
  6896.  
  6897. Declare Function IsWindowUnicode Lib "user32" Alias "IsWindowUnicode" (ByVal hwnd As Long) As Long
  6898.  
  6899. Declare Function EnableWindow Lib "user32" Alias "EnableWindow" (ByVal hwnd As Long, ByVal fEnable As Long) As Long
  6900. Declare Function IsWindowEnabled Lib "user32" Alias "IsWindowEnabled" (ByVal hwnd As Long) As Long
  6901.  
  6902. Declare Function LoadAccelerators Lib "user32" Alias "LoadAcceleratorsA" (ByVal hInstance As Long, ByVal lpTableName As String) As Long
  6903. Declare Function CreateAcceleratorTable Lib "user32" Alias "CreateAcceleratorTableA" (lpaccl As ACCEL, ByVal cEntries As Long) As Long
  6904. Declare Function DestroyAcceleratorTable Lib "user32" Alias "DestroyAcceleratorTable" (ByVal haccel As Long) As Long
  6905. Declare Function CopyAcceleratorTable Lib "user32" Alias "CopyAcceleratorTableA" (ByVal hAccelSrc As Long, lpAccelDst As ACCEL, ByVal cAccelEntries As Long) As Long
  6906. Declare Function TranslateAccelerator Lib "user32" Alias "TranslateAcceleratorA" (ByVal hwnd As Long, ByVal hAccTable As Long, lpMsg As MSG) As Long
  6907.  
  6908. ' GetSystemMetrics() codes
  6909. Const SM_CXSCREEN = 0
  6910. Const SM_CYSCREEN = 1
  6911. Const SM_CXVSCROLL = 2
  6912. Const SM_CYHSCROLL = 3
  6913. Const SM_CYCAPTION = 4
  6914. Const SM_CXBORDER = 5
  6915. Const SM_CYBORDER = 6
  6916. Const SM_CXDLGFRAME = 7
  6917. Const SM_CYDLGFRAME = 8
  6918. Const SM_CYVTHUMB = 9
  6919. Const SM_CXHTHUMB = 10
  6920. Const SM_CXICON = 11
  6921. Const SM_CYICON = 12
  6922. Const SM_CXCURSOR = 13
  6923. Const SM_CYCURSOR = 14
  6924. Const SM_CYMENU = 15
  6925. Const SM_CXFULLSCREEN = 16
  6926. Const SM_CYFULLSCREEN = 17
  6927. Const SM_CYKANJIWINDOW = 18
  6928. Const SM_MOUSEPRESENT = 19
  6929. Const SM_CYVSCROLL = 20
  6930. Const SM_CXHSCROLL = 21
  6931. Const SM_DEBUG = 22
  6932. Const SM_SWAPBUTTON = 23
  6933. Const SM_RESERVED1 = 24
  6934. Const SM_RESERVED2 = 25
  6935. Const SM_RESERVED3 = 26
  6936. Const SM_RESERVED4 = 27
  6937. Const SM_CXMIN = 28
  6938. Const SM_CYMIN = 29
  6939. Const SM_CXSIZE = 30
  6940. Const SM_CYSIZE = 31
  6941. Const SM_CXFRAME = 32
  6942. Const SM_CYFRAME = 33
  6943. Const SM_CXMINTRACK = 34
  6944. Const SM_CYMINTRACK = 35
  6945. Const SM_CXDOUBLECLK = 36
  6946. Const SM_CYDOUBLECLK = 37
  6947. Const SM_CXICONSPACING = 38
  6948. Const SM_CYICONSPACING = 39
  6949. Const SM_MENUDROPALIGNMENT = 40
  6950. Const SM_PENWINDOWS = 41
  6951. Const SM_DBCSENABLED = 42
  6952. Const SM_CMOUSEBUTTONS = 43
  6953. Const SM_CMETRICS = 44
  6954. Const SM_CXSIZEFRAME = SM_CXFRAME
  6955. Const SM_CYSIZEFRAME = SM_CYFRAME
  6956. Const SM_CXFIXEDFRAME = SM_CXDLGFRAME 
  6957. Const SM_CYFIXEDFRAME = SM_CYDLGFRAME 
  6958.  
  6959. Declare Function GetSystemMetrics Lib "user32" Alias "GetSystemMetrics" (ByVal nIndex As Long) As Long
  6960.  
  6961. Declare Function LoadMenu Lib "user32" Alias "LoadMenuA" (ByVal hInstance As Long, ByVal lpString As String) As Long
  6962. Declare Function LoadMenuIndirect Lib "user32" Alias "LoadMenuIndirectA" (ByVal lpMenuTemplate As Long) As Long
  6963. Declare Function GetMenu Lib "user32" Alias "GetMenu" (ByVal hwnd As Long) As Long
  6964. Declare Function SetMenu Lib "user32" Alias "SetMenu" (ByVal hwnd As Long, ByVal hMenu As Long) As Long
  6965. Declare Function HiliteMenuItem Lib "user32" Alias "HiliteMenuItem" (ByVal hwnd As Long, ByVal hMenu As Long, ByVal wIDHiliteItem As Long, ByVal wHilite As Long) As Long
  6966. Declare Function GetMenuString Lib "user32" Alias "GetMenuStringA" (ByVal hMenu As Long, ByVal wIDItem As Long, ByVal lpString As String, ByVal nMaxCount As Long, ByVal wFlag As Long) As Long
  6967. Declare Function GetMenuState Lib "user32" Alias "GetMenuState" (ByVal hMenu As Long, ByVal wID As Long, ByVal wFlags As Long) As Long
  6968. Declare Function DrawMenuBar Lib "user32" Alias "DrawMenuBar" (ByVal hwnd As Long) As Long
  6969. Declare Function GetSystemMenu Lib "user32" Alias "GetSystemMenu" (ByVal hwnd As Long, ByVal bRevert As Long) As Long
  6970. Declare Function CreateMenu Lib "user32" Alias "CreateMenu" () As Long
  6971. Declare Function CreatePopupMenu Lib "user32" Alias "CreatePopupMenu" () As Long
  6972. Declare Function DestroyMenu Lib "user32" Alias "DestroyMenu" (ByVal hMenu As Long) As Long
  6973. Declare Function CheckMenuItem Lib "user32" Alias "CheckMenuItem" (ByVal hMenu As Long, ByVal wIDCheckItem As Long, ByVal wCheck As Long) As Long
  6974. Declare Function EnableMenuItem Lib "user32" Alias "EnableMenuItem" (ByVal hMenu As Long, ByVal wIDEnableItem As Long, ByVal wEnable As Long) As Long
  6975. Declare Function GetSubMenu Lib "user32" Alias "GetSubMenu" (ByVal hMenu As Long, ByVal nPos As Long) As Long
  6976. Declare Function GetMenuItemID Lib "user32" Alias "GetMenuItemID" (ByVal hMenu As Long, ByVal nPos As Long) As Long
  6977. Declare Function GetMenuItemCount Lib "user32" Alias "GetMenuItemCount" (ByVal hMenu As Long) As Long
  6978.  
  6979. Declare Function InsertMenu Lib "user32" Alias "InsertMenuA" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long, ByVal wIDNewItem As Long, ByVal lpNewItem As Any) As Long
  6980. Declare Function AppendMenu Lib "user32" Alias "AppendMenuA" (ByVal hMenu As Long, ByVal wFlags As Long, ByVal wIDNewItem As Long, ByVal lpNewItem As Any) As Long
  6981. Declare Function ModifyMenu Lib "user32" Alias "ModifyMenuA" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long, ByVal wIDNewItem As Long, ByVal lpString As Any) As Long
  6982. Declare Function RemoveMenu Lib "user32" Alias "RemoveMenu" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long) As Long
  6983. Declare Function DeleteMenu Lib "user32" Alias "DeleteMenu" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long) As Long
  6984. Declare Function SetMenuItemBitmaps Lib "user32" Alias "SetMenuItemBitmaps" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long, ByVal hBitmapUnchecked As Long, ByVal hBitmapChecked As Long) As Long
  6985. Declare Function GetMenuCheckMarkDimensions Lib "user32" Alias "GetMenuCheckMarkDimensions" () As Long
  6986. Declare Function TrackPopupMenu Lib "user32" Alias "TrackPopupMenu" (ByVal hMenu As Long, ByVal wFlags As Long, ByVal x As Long, ByVal y As Long, ByVal nReserved As Long, ByVal hwnd As Long, lprc As Rect) As Long
  6987.  
  6988. ' Flags for TrackPopupMenu
  6989. Const TPM_LEFTBUTTON = &H0&
  6990. Const TPM_RIGHTBUTTON = &H2&
  6991. Const TPM_LEFTALIGN = &H0&
  6992. Const TPM_CENTERALIGN = &H4&
  6993. Const TPM_RIGHTALIGN = &H8&
  6994.  
  6995. Declare Function DrawIcon Lib "user32" Alias "DrawIcon" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal hIcon As Long) As Long
  6996.  
  6997. ' DrawText() Format Flags
  6998. Const DT_TOP = &H0
  6999. Const DT_LEFT = &H0
  7000. Const DT_CENTER = &H1
  7001. Const DT_RIGHT = &H2
  7002. Const DT_VCENTER = &H4
  7003. Const DT_BOTTOM = &H8
  7004. Const DT_WORDBREAK = &H10
  7005. Const DT_SINGLELINE = &H20
  7006. Const DT_EXPANDTABS = &H40
  7007. Const DT_TABSTOP = &H80
  7008. Const DT_NOCLIP = &H100
  7009. Const DT_EXTERNALLEADING = &H200
  7010. Const DT_CALCRECT = &H400
  7011. Const DT_NOPREFIX = &H800
  7012. Const DT_INTERNAL = &H1000
  7013.  
  7014. Declare Function DrawText Lib "user32" Alias "DrawTextA" (ByVal hdc As Long, ByVal lpStr As String, ByVal nCount As Long, lpRect As RECT, ByVal wFormat As Long) As Long
  7015. Declare Function TabbedTextOut Lib "user32" Alias "TabbedTextOutA" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal lpString As String, ByVal nCount As Long, ByVal nTabPositions As Long, lpnTabStopPositions As Long, ByVal nTabOrigin As Long) As Long
  7016. Declare Function GetTabbedTextExtent Lib "user32" Alias "GetTabbedTextExtentA" (ByVal hdc As Long, ByVal lpString As String, ByVal nCount As Long, ByVal nTabPositions As Long, lpnTabStopPositions As Long) As Long
  7017.  
  7018. Declare Function UpdateWindow Lib "user32" Alias "UpdateWindow" (ByVal hwnd As Long) As Long
  7019. Declare Function SetActiveWindow Lib "user32" Alias "SetActiveWindow" (ByVal hwnd As Long) As Long
  7020. Declare Function GetForegroundWindow Lib "user32" Alias "GetForegroundWindow" () As Long
  7021. Declare Function SetForegroundWindow Lib "user32" Alias "SetForegroundWindow" (ByVal hwnd As Long) As Long
  7022. Declare Function WindowFromDC Lib "user32" Alias "WindowFromDC" (ByVal hdc As Long) As Long
  7023.  
  7024. Declare Function GetDC Lib "user32" Alias "GetDC" (ByVal hwnd As Long) As Long
  7025. Declare Function GetDCEx Lib "user32" Alias "GetDCEx" (ByVal hwnd As Long, ByVal hrgnclip As Long, ByVal fdwOptions As Long) As Long
  7026.  
  7027. Const DCX_WINDOW = &H1&
  7028. Const DCX_CACHE = &H2&
  7029. Const DCX_NORESETATTRS = &H4&
  7030. Const DCX_CLIPCHILDREN = &H8&
  7031. Const DCX_CLIPSIBLINGS = &H10&
  7032. Const DCX_PARENTCLIP = &H20&
  7033.  
  7034. Const DCX_EXCLUDERGN = &H40&
  7035. Const DCX_INTERSECTRGN = &H80&
  7036.  
  7037. Const DCX_EXCLUDEUPDATE = &H100&
  7038. Const DCX_INTERSECTUPDATE = &H200&
  7039.  
  7040. Const DCX_LOCKWINDOWUPDATE = &H400&
  7041.  
  7042. Const DCX_NORECOMPUTE = &H100000
  7043. Const DCX_VALIDATE = &H200000
  7044.  
  7045. Declare Function GetWindowDC Lib "user32" Alias "GetWindowDC" (ByVal hwnd As Long) As Long
  7046. Declare Function ReleaseDC Lib "user32" Alias "ReleaseDC" (ByVal hwnd As Long, ByVal hdc As Long) As Long
  7047.  
  7048. Declare Function BeginPaint Lib "user32" Alias "BeginPaint" (ByVal hwnd As Long, lpPaint As PAINTSTRUCT) As Long
  7049. Declare Function EndPaint Lib "user32" Alias "EndPaint" (ByVal hwnd As Long, lpPaint As PAINTSTRUCT) As Long
  7050. Declare Function GetUpdateRect Lib "user32" Alias "GetUpdateRect" (ByVal hwnd As Long, lpRect As RECT, ByVal bErase As Long) As Long
  7051. Declare Function GetUpdateRgn Lib "user32" Alias "GetUpdateRgn" (ByVal hwnd As Long, ByVal hRgn As Long, ByVal fErase As Long) As Long
  7052. Declare Function ExcludeUpdateRgn Lib "user32" Alias "ExcludeUpdateRgn" (ByVal hdc As Long, ByVal hwnd As Long) As Long
  7053. Declare Function InvalidateRect Lib "user32" Alias "InvalidateRect" (ByVal hwnd As Long, lpRect As RECT, ByVal bErase As Long) As Long
  7054. Declare Function ValidateRect Lib "user32" Alias "ValidateRect" (ByVal hwnd As Long, lpRect As RECT) As Long
  7055. Declare Function InvalidateRgn Lib "user32" Alias "InvalidateRgn" (ByVal hwnd As Long, ByVal hRgn As Long, ByVal bErase As Long) As Long
  7056. Declare Function ValidateRgn Lib "user32" Alias "ValidateRgn" (ByVal hwnd As Long, ByVal hRgn As Long) As Long
  7057.  
  7058. Declare Function RedrawWindow Lib "user32" Alias "RedrawWindow" (ByVal hwnd As Long, lprcUpdate As RECT, ByVal hrgnUpdate As Long, ByVal fuRedraw As Long) As Long
  7059.  
  7060. Const RDW_INVALIDATE = &H1
  7061. Const RDW_INTERNALPAINT = &H2
  7062. Const RDW_ERASE = &H4
  7063.  
  7064. Const RDW_VALIDATE = &H8
  7065. Const RDW_NOINTERNALPAINT = &H10
  7066. Const RDW_NOERASE = &H20
  7067.  
  7068. Const RDW_NOCHILDREN = &H40
  7069. Const RDW_ALLCHILDREN = &H80
  7070.  
  7071. Const RDW_UPDATENOW = &H100
  7072. Const RDW_ERASENOW = &H200
  7073.  
  7074. Const RDW_FRAME = &H400
  7075. Const RDW_NOFRAME = &H800
  7076.  
  7077. Declare Function LockWindowUpdate Lib "user32" Alias "LockWindowUpdate" (ByVal hwndLock As Long) As Long
  7078.  
  7079. Declare Function ScrollWindow Lib "user32" Alias "ScrollWindow" (ByVal hWnd As Long, ByVal XAmount As Long, ByVal YAmount As Long, lpRect As RECT, lpClipRect As RECT) As Long
  7080. Declare Function ScrollDC Lib "user32" Alias "ScrollDC" (ByVal hdc As Long, ByVal dx As Long, ByVal dy As Long, lprcScroll As RECT, lprcClip As RECT, ByVal hrgnUpdate As Long, lprcUpdate As RECT) As Long
  7081. Declare Function ScrollWindowEx Lib "user32" Alias "ScrollWindowEx" (ByVal hwnd As Long, ByVal dx As Long, ByVal dy As Long, lprcScroll As RECT, lprcClip As RECT, ByVal hrgnUpdate As Long, lprcUpdate As RECT, ByVal fuScroll As Long) As Long
  7082.  
  7083. Const SW_SCROLLCHILDREN = &H1
  7084. Const SW_INVALIDATE = &H2
  7085. Const SW_ERASE = &H4
  7086.  
  7087. Declare Function SetScrollPos Lib "user32" Alias "SetScrollPos" (ByVal hwnd As Long, ByVal nBar As Long, ByVal nPos As Long, ByVal bRedraw As Long) As Long
  7088. Declare Function GetScrollPos Lib "user32" Alias "GetScrollPos" (ByVal hwnd As Long, ByVal nBar As Long) As Long
  7089. Declare Function SetScrollRange Lib "user32" Alias "SetScrollRange" (ByVal hwnd As Long, ByVal nBar As Long, ByVal nMinPos As Long, ByVal nMaxPos As Long, ByVal bRedraw As Long) As Long
  7090. Declare Function GetScrollRange Lib "user32" Alias "GetScrollRange" (ByVal hwnd As Long, ByVal nBar As Long, lpMinPos As Long, lpMaxPos As Long) As Long
  7091. Declare Function ShowScrollBar Lib "user32" Alias "ShowScrollBar" (ByVal hwnd As Long, ByVal wBar As Long, ByVal bShow As Long) As Long
  7092. Declare Function EnableScrollBar Lib "user32" Alias "EnableScrollBar" (ByVal hwnd As Long, ByVal wSBflags As Long, ByVal wArrows As Long) As Long
  7093.  
  7094. ' EnableScrollBar() flags
  7095. Const ESB_ENABLE_BOTH = &H0
  7096. Const ESB_DISABLE_BOTH = &H3
  7097.  
  7098. Const ESB_DISABLE_LEFT = &H1
  7099. Const ESB_DISABLE_RIGHT = &H2
  7100.  
  7101. Const ESB_DISABLE_UP = &H1
  7102. Const ESB_DISABLE_DOWN = &H2
  7103.  
  7104. Const ESB_DISABLE_LTUP = ESB_DISABLE_LEFT
  7105. Const ESB_DISABLE_RTDN = ESB_DISABLE_RIGHT
  7106.  
  7107. Declare Function SetProp Lib "user32" Alias "SetPropA" (ByVal hwnd As Long, ByVal lpString As String, ByVal hData As Long) As Long
  7108. Declare Function GetProp Lib "user32" Alias "GetPropA" (ByVal hwnd As Long, ByVal lpString As String) As Long
  7109. Declare Function RemoveProp Lib "user32" Alias "RemovePropA" (ByVal hwnd As Long, ByVal lpString As String) As Long
  7110.  
  7111. Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long
  7112. Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
  7113. Declare Function GetWindowTextLength Lib "user32" Alias "GetWindowTextLengthA" (ByVal hwnd As Long) As Long
  7114.  
  7115. Declare Function GetClientRect Lib "user32" Alias "GetClientRect" (ByVal hwnd As Long, lpRect As RECT) As Long
  7116. Declare Function GetWindowRect Lib "user32" Alias "GetWindowRect" (ByVal hwnd As Long, lpRect As RECT) As Long
  7117. Declare Function AdjustWindowRect Lib "user32" Alias "AdjustWindowRect" (lpRect As RECT, ByVal dwStyle As Long, ByVal bMenu As Long) As Long
  7118. Declare Function AdjustWindowRectEx Lib "user32" Alias "AdjustWindowRectEx" (lpRect As RECT, ByVal dsStyle As Long, ByVal bMenu As Long, ByVal dwEsStyle As Long) As Long
  7119.  
  7120. ' MessageBox() Flags
  7121. Const MB_OK = &H0&
  7122. Const MB_OKCANCEL = &H1&
  7123. Const MB_ABORTRETRYIGNORE = &H2&
  7124. Const MB_YESNOCANCEL = &H3&
  7125. Const MB_YESNO = &H4&
  7126. Const MB_RETRYCANCEL = &H5&
  7127.  
  7128. Const MB_ICONHAND = &H10&
  7129. Const MB_ICONQUESTION = &H20&
  7130. Const MB_ICONEXCLAMATION = &H30&
  7131. Const MB_ICONASTERISK = &H40&
  7132.  
  7133. Const MB_ICONINFORMATION = MB_ICONASTERISK
  7134. Const MB_ICONSTOP = MB_ICONHAND
  7135.  
  7136. Const MB_DEFBUTTON1 = &H0&
  7137. Const MB_DEFBUTTON2 = &H100&
  7138. Const MB_DEFBUTTON3 = &H200&
  7139.  
  7140. Const MB_APPLMODAL = &H0&
  7141. Const MB_SYSTEMMODAL = &H1000&
  7142. Const MB_TASKMODAL = &H2000&
  7143.  
  7144. Const MB_NOFOCUS = &H8000&
  7145. Const MB_SETFOREGROUND = &H10000
  7146. Const MB_DEFAULT_DESKTOP_ONLY = &H20000
  7147.  
  7148. Const MB_TYPEMASK = &HF&
  7149. Const MB_ICONMASK = &HF0&
  7150. Const MB_DEFMASK = &HF00&
  7151. Const MB_MODEMASK = &H3000&
  7152. Const MB_MISCMASK = &HC000&
  7153.  
  7154. Declare Function MessageBox Lib "user32" Alias "MessageBoxA" (ByVal hwnd As Long, ByVal lpText As String, ByVal lpCaption As String, ByVal wType As Long) As Long
  7155. Declare Function MessageBoxEx Lib "user32" Alias "MessageBoxExA" (ByVal hwnd As Long, ByVal lpText As String, ByVal lpCaption As String, ByVal uType As Long, ByVal wLanguageId As Long) As Long
  7156. Declare Function MessageBeep Lib "user32" Alias "MessageBeep" (ByVal wType As Long) As Long
  7157.  
  7158. Declare Function ShowCursor Lib "user32" Alias "ShowCursor" (ByVal bShow As Long) As Long
  7159. Declare Function SetCursorPos Lib "user32" Alias "SetCursorPos" (ByVal x As Long, ByVal y As Long) As Long
  7160. Declare Function SetCursor Lib "user32" Alias "SetCursor" (ByVal hCursor As Long) As Long
  7161. Declare Function GetCursorPos Lib "user32" Alias "GetCursorPos" (lpPoint As POINTAPI) As Long
  7162. Declare Function ClipCursor Lib "user32" Alias "ClipCursor" (lpRect As Any) As Long
  7163. Declare Function GetCursor Lib "user32" Alias "GetCursor" () As Long
  7164. Declare Function GetClipCursor Lib "user32" Alias "GetClipCursor" (lprc As RECT) As Long
  7165.  
  7166. Declare Function CreateCaret Lib "user32" Alias "CreateCaret" (ByVal hwnd As Long, ByVal hBitmap As Long, ByVal nWidth As Long, ByVal nHeight As Long) As Long
  7167. Declare Function GetCaretBlinkTime Lib "user32" Alias "GetCaretBlinkTime" () As Long
  7168. Declare Function SetCaretBlinkTime Lib "user32" Alias "SetCaretBlinkTime" (ByVal wMSeconds As Long) As Long
  7169. Declare Function DestroyCaret Lib "user32" Alias "DestroyCaret" () As Long
  7170. Declare Function HideCaret Lib "user32" Alias "HideCaret" (ByVal hwnd As Long) As Long
  7171. Declare Function ShowCaret Lib "user32" Alias "ShowCaret" (ByVal hwnd As Long) As Long
  7172. Declare Function SetCaretPos Lib "user32" Alias "SetCaretPos" (ByVal x As Long, ByVal y As Long) As Long
  7173. Declare Function GetCaretPos Lib "user32" Alias "GetCaretPos" (lpPoint As POINTAPI) As Long
  7174.  
  7175. Declare Function ClientToScreen Lib "user32" Alias "ClientToScreen" (ByVal hwnd As Long, lpPoint As POINTAPI) As Long
  7176. Declare Function ScreenToClient Lib "user32" Alias "ScreenToClient" (ByVal hwnd As Long, lpPoint As POINTAPI) As Long
  7177.  
  7178. Declare Function MapWindowPoints Lib "user32" Alias "MapWindowPoints" (ByVal hwndFrom As Long, ByVal hwndTo As Long, lppt As Any, ByVal cPoints As Long) As Long
  7179. Declare Function WindowFromPoint Lib "user32" Alias "WindowFromPoint" (ByVal xPoint As Long, ByVal yPoint As Long) As Long
  7180. Declare Function ChildWindowFromPoint Lib "user32" Alias "ChildWindowFromPoint" (ByVal hWnd As Long, ByVal xPoint As Long, ByVal yPoint As Long) As Long
  7181.  
  7182. ' Color Types
  7183. Const CTLCOLOR_MSGBOX = 0
  7184. Const CTLCOLOR_EDIT = 1
  7185. Const CTLCOLOR_LISTBOX = 2
  7186. Const CTLCOLOR_BTN = 3
  7187. Const CTLCOLOR_DLG = 4
  7188. Const CTLCOLOR_SCROLLBAR = 5
  7189. Const CTLCOLOR_STATIC = 6
  7190. Const CTLCOLOR_MAX = 8   '  three bits max
  7191.  
  7192. Const COLOR_SCROLLBAR = 0
  7193. Const COLOR_BACKGROUND = 1
  7194. Const COLOR_ACTIVECAPTION = 2
  7195. Const COLOR_INACTIVECAPTION = 3
  7196. Const COLOR_MENU = 4
  7197. Const COLOR_WINDOW = 5
  7198. Const COLOR_WINDOWFRAME = 6
  7199. Const COLOR_MENUTEXT = 7
  7200. Const COLOR_WINDOWTEXT = 8
  7201. Const COLOR_CAPTIONTEXT = 9
  7202. Const COLOR_ACTIVEBORDER = 10
  7203. Const COLOR_INACTIVEBORDER = 11
  7204. Const COLOR_APPWORKSPACE = 12
  7205. Const COLOR_HIGHLIGHT = 13
  7206. Const COLOR_HIGHLIGHTTEXT = 14
  7207. Const COLOR_BTNFACE = 15
  7208. Const COLOR_BTNSHADOW = 16
  7209. Const COLOR_GRAYTEXT = 17
  7210. Const COLOR_BTNTEXT = 18
  7211. Const COLOR_INACTIVECAPTIONTEXT = 19
  7212. Const COLOR_BTNHIGHLIGHT = 20
  7213.  
  7214. Declare Function GetSysColor Lib "user32" Alias "GetSysColor" (ByVal nIndex As Long) As Long
  7215. Declare Function SetSysColors Lib "user32" Alias "SetSysColors" (ByVal nChanges As Long, lpSysColor As Long, lpColorValues As Long) As Long
  7216.  
  7217. Declare Function DrawFocusRect Lib "user32" Alias "DrawFocusRect" (ByVal hdc As Long, lpRect As RECT) As Long
  7218. Declare Function FillRect Lib "user32" Alias "FillRect" (ByVal hdc As Long, lpRect As RECT, ByVal hBrush As Long) As Long
  7219. Declare Function FrameRect Lib "user32" Alias "FrameRect" (ByVal hdc As Long, lpRect As RECT, ByVal hBrush As Long) As Long
  7220. Declare Function InvertRect Lib "user32" Alias "InvertRect" (ByVal hdc As Long, lpRect As RECT) As Long
  7221. Declare Function SetRect Lib "user32" Alias "SetRect" (lpRect As RECT, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
  7222. Declare Function SetRectEmpty Lib "user32" Alias "SetRectEmpty" (lpRect As RECT) As Long
  7223. Declare Function CopyRect Lib "user32" Alias "CopyRect" (lpDestRect As RECT, lpSourceRect As RECT) As Long
  7224. Declare Function InflateRect Lib "user32" Alias "InflateRect" (lpRect As RECT, ByVal x As Long, ByVal y As Long) As Long
  7225. Declare Function IntersectRect Lib "user32" Alias "IntersectRect" (lpDestRect As RECT, lpSrc1Rect As RECT, lpSrc2Rect As RECT) As Long
  7226. Declare Function UnionRect Lib "user32" Alias "UnionRect" (lpDestRect As RECT, lpSrc1Rect As RECT, lpSrc2Rect As RECT) As Long
  7227. Declare Function SubtractRect Lib "user32" Alias "SubtractRect" (lprcDst As RECT, lprcSrc1 As RECT, lprcSrc2 As RECT) As Long
  7228. Declare Function OffsetRect Lib "user32" Alias "OffsetRect" (lpRect As RECT, ByVal x As Long, ByVal y As Long) As Long
  7229. Declare Function IsRectEmpty Lib "user32" Alias "IsRectEmpty" (lpRect As RECT) As Long
  7230. Declare Function EqualRect Lib "user32" Alias "EqualRect" (lpRect1 As RECT, lpRect2 As RECT) As Long
  7231. Declare Function PtInRect Lib "user32" Alias "PtInRect" (lpRect As RECT, pt As POINTAPI) As Long
  7232.  
  7233. Declare Function GetWindowWord Lib "user32" Alias "GetWindowWord" (ByVal hwnd As Long, ByVal nIndex As Long) As Integer
  7234. Declare Function SetWindowWord Lib "user32" Alias "SetWindowWord" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal wNewWord As Long) As Long
  7235. Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
  7236. Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
  7237. Declare Function GetClassWord Lib "user32" Alias "GetClassWord" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
  7238. Declare Function SetClassWord Lib "user32" Alias "SetClassWord" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal wNewWord As Long) As Long
  7239. Declare Function GetClassLong Lib "user32" Alias "GetClassLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
  7240. Declare Function SetClassLong Lib "user32" Alias "SetClassLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
  7241. Declare Function GetDesktopWindow Lib "user32" Alias "GetDesktopWindow" () As Long
  7242.  
  7243. Declare Function GetParent Lib "user32" Alias "GetParent" (ByVal hwnd As Long) As Long
  7244. Declare Function SetParent Lib "user32" Alias "SetParent" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
  7245. Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
  7246.  
  7247. Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
  7248. Declare Function GetTopWindow Lib "user32" Alias "GetTopWindow" (ByVal hwnd As Long) As Long
  7249. Declare Function GetNextWindow Lib "user32" Alias "GetWindow" (ByVal hwnd As Long, ByVal wFlag As Long) As Long
  7250.  
  7251. Declare Function GetWindowThreadProcessId Lib "user32" Alias "GetWindowThreadProcessId" (ByVal hwnd As Long, lpdwProcessId As Long) As Long
  7252.  
  7253. Declare Function GetLastActivePopup Lib "user32" Alias "GetLastActivePopup" (ByVal hwndOwnder As Long) As Long
  7254.  
  7255. ' GetWindow() Constants
  7256. Const GW_HWNDFIRST = 0
  7257. Const GW_HWNDLAST = 1
  7258. Const GW_HWNDNEXT = 2
  7259. Const GW_HWNDPREV = 3
  7260. Const GW_OWNER = 4
  7261. Const GW_CHILD = 5
  7262. Const GW_MAX = 5
  7263.  
  7264. Declare Function GetWindow Lib "user32" Alias "GetWindow" (ByVal hwnd As Long, ByVal wCmd As Long) As Long
  7265. Declare Function UnhookWindowsHookEx Lib "user32" Alias "UnhookWindowsHookEx" (ByVal hHook As Long) As Long
  7266. Declare Function CallNextHookEx Lib "user32" Alias "CallNextHookEx" (ByVal hHook As Long, ByVal ncode As Long, ByVal wParam As Long, lParam As Any) As Long
  7267.  
  7268. ' Menu flags for Add/Check/EnableMenuItem()
  7269. Const MF_INSERT = &H0&
  7270. Const MF_CHANGE = &H80&
  7271. Const MF_APPEND = &H100&
  7272. Const MF_DELETE = &H200&
  7273. Const MF_REMOVE = &H1000&
  7274.  
  7275. Const MF_BYCOMMAND = &H0&
  7276. Const MF_BYPOSITION = &H400&
  7277.  
  7278. Const MF_SEPARATOR = &H800&
  7279.  
  7280. Const MF_ENABLED = &H0&
  7281. Const MF_GRAYED = &H1&
  7282. Const MF_DISABLED = &H2&
  7283.  
  7284. Const MF_UNCHECKED = &H0&
  7285. Const MF_CHECKED = &H8&
  7286. Const MF_USECHECKBITMAPS = &H200&
  7287.  
  7288. Const MF_STRING = &H0&
  7289. Const MF_BITMAP = &H4&
  7290. Const MF_OWNERDRAW = &H100&
  7291.  
  7292. Const MF_POPUP = &H10&
  7293. Const MF_MENUBARBREAK = &H20&
  7294. Const MF_MENUBREAK = &H40&
  7295.  
  7296. Const MF_UNHILITE = &H0&
  7297. Const MF_HILITE = &H80&
  7298.  
  7299. Const MF_SYSMENU = &H2000&
  7300. Const MF_HELP = &H4000&
  7301. Const MF_MOUSESELECT = &H8000&
  7302.  
  7303. ' Menu item resource format
  7304. Type MENUITEMTEMPLATEHEADER
  7305.         versionNumber As Integer
  7306.         offset As Integer
  7307. End Type
  7308.  
  7309. Type MENUITEMTEMPLATE
  7310.         mtOption As Integer
  7311.         mtID As Integer
  7312.         mtString As Byte
  7313. End Type
  7314.  
  7315. Const MF_END = &H80
  7316.  
  7317. ' System Menu Command Values
  7318.  
  7319.  
  7320. Const SC_SIZE = &HF000&
  7321. Const SC_MOVE = &HF010&
  7322. Const SC_MINIMIZE = &HF020&
  7323. Const SC_MAXIMIZE = &HF030&
  7324. Const SC_NEXTWINDOW = &HF040&
  7325. Const SC_PREVWINDOW = &HF050&
  7326. Const SC_CLOSE = &HF060&
  7327. Const SC_VSCROLL = &HF070&
  7328. Const SC_HSCROLL = &HF080&
  7329. Const SC_MOUSEMENU = &HF090&
  7330. Const SC_KEYMENU = &HF100&
  7331. Const SC_ARRANGE = &HF110&
  7332. Const SC_RESTORE = &HF120&
  7333. Const SC_TASKLIST = &HF130&
  7334. Const SC_SCREENSAVE = &HF140&
  7335. Const SC_HOTKEY = &HF150&
  7336.  
  7337. ' Obsolete names
  7338. Const SC_ICON = SC_MINIMIZE
  7339. Const SC_ZOOM = SC_MAXIMIZE
  7340.  
  7341. ' Resource Loading Routines
  7342. Declare Function LoadBitmap Lib "user32" Alias "LoadBitmapA" (ByVal hInstance As Long, ByVal lpBitmapName As String) As Long
  7343. Declare Function LoadCursor Lib "user32" Alias "LoadCursorA" (ByVal hInstance As Long, ByVal lpCursorName As String) As Long
  7344. Declare Function CreateCursor Lib "user32" Alias "CreateCursor" (ByVal hInstance As Long, ByVal nXhotspot As Long, ByVal nYhotspot As Long, ByVal nWidth As Long, ByVal nHeight As Long, lpANDbitPlane As Any, lpXORbitPlane As Any) As Long
  7345. Declare Function DestroyCursor Lib "user32" Alias "DestroyCursor" (ByVal hCursor As Long) As Long
  7346. Declare Function CopyCursor Lib "user32" Alias "CopyCursor" (ByVal hcur As Long) As Long
  7347.  
  7348. ' Standard Cursor IDs
  7349. Const IDC_ARROW = 32512&
  7350. Const IDC_IBEAM = 32513&
  7351. Const IDC_WAIT = 32514&
  7352. Const IDC_CROSS = 32515&
  7353. Const IDC_UPARROW = 32516&
  7354. Const IDC_SIZE = 32640&
  7355. Const IDC_ICON = 32641&
  7356. Const IDC_SIZENWSE = 32642&
  7357. Const IDC_SIZENESW = 32643&
  7358. Const IDC_SIZEWE = 32644&
  7359. Const IDC_SIZENS = 32645&
  7360. Const IDC_SIZEALL = 32646&
  7361. Const IDC_NO = 32648&
  7362. Const IDC_APPSTARTING = 32650&
  7363.  
  7364. Type ICONINFO
  7365.         fIcon As Long
  7366.         xHotspot As Long
  7367.         yHotspot As Long
  7368.         hbmMask As Long
  7369.         hbmColor As Long
  7370. End Type
  7371.  
  7372. Declare Function LoadIcon Lib "user32" Alias "LoadIconA" (ByVal hInstance As Long, ByVal lpIconName As String) As Long
  7373. Declare Function CreateIcon Lib "user32" Alias "CreateIcon" (ByVal hInstance As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal nPlanes As Byte, ByVal nBitsPixel As Byte, lpANDbits As Byte, lpXORbits As Byte) As Long
  7374. Declare Function DestroyIcon Lib "user32" Alias "DestroyIcon" (ByVal hIcon As Long) As Long
  7375. Declare Function LookupIconIdFromDirectory Lib "user32" Alias "LookupIconIdFromDirectory" (presbits As Byte, ByVal fIcon As Long) As Long
  7376. Declare Function CreateIconIndirect Lib "user32" Alias "CreateIconIndirect" (piconinfo As ICONINFO) As Long
  7377. Declare Function CopyIcon Lib "user32" Alias "CopyIcon" (ByVal hIcon As Long) As Long
  7378. Declare Function GetIconInfo Lib "user32" Alias "GetIconInfo" (ByVal hIcon As Long, piconinfo As ICONINFO) As Long
  7379.  
  7380. ' OEM Resource Ordinal Numbers
  7381. Const OBM_CLOSE = 32754
  7382. Const OBM_UPARROW = 32753
  7383. Const OBM_DNARROW = 32752
  7384. Const OBM_RGARROW = 32751
  7385. Const OBM_LFARROW = 32750
  7386. Const OBM_REDUCE = 32749
  7387. Const OBM_ZOOM = 32748
  7388. Const OBM_RESTORE = 32747
  7389. Const OBM_REDUCED = 32746
  7390. Const OBM_ZOOMD = 32745
  7391. Const OBM_RESTORED = 32744
  7392. Const OBM_UPARROWD = 32743
  7393. Const OBM_DNARROWD = 32742
  7394. Const OBM_RGARROWD = 32741
  7395. Const OBM_LFARROWD = 32740
  7396. Const OBM_MNARROW = 32739
  7397. Const OBM_COMBO = 32738
  7398. Const OBM_UPARROWI = 32737
  7399. Const OBM_DNARROWI = 32736
  7400. Const OBM_RGARROWI = 32735
  7401. Const OBM_LFARROWI = 32734
  7402.  
  7403. Const OBM_OLD_CLOSE = 32767
  7404. Const OBM_SIZE = 32766
  7405. Const OBM_OLD_UPARROW = 32765
  7406. Const OBM_OLD_DNARROW = 32764
  7407. Const OBM_OLD_RGARROW = 32763
  7408. Const OBM_OLD_LFARROW = 32762
  7409. Const OBM_BTSIZE = 32761
  7410. Const OBM_CHECK = 32760
  7411. Const OBM_CHECKBOXES = 32759
  7412. Const OBM_BTNCORNERS = 32758
  7413. Const OBM_OLD_REDUCE = 32757
  7414. Const OBM_OLD_ZOOM = 32756
  7415. Const OBM_OLD_RESTORE = 32755
  7416.  
  7417. Const OCR_NORMAL = 32512
  7418. Const OCR_IBEAM = 32513
  7419. Const OCR_WAIT = 32514
  7420. Const OCR_CROSS = 32515
  7421. Const OCR_UP = 32516
  7422. Const OCR_SIZE = 32640
  7423. Const OCR_ICON = 32641
  7424. Const OCR_SIZENWSE = 32642
  7425. Const OCR_SIZENESW = 32643
  7426. Const OCR_SIZEWE = 32644
  7427. Const OCR_SIZENS = 32645
  7428. Const OCR_SIZEALL = 32646
  7429. Const OCR_ICOCUR = 32647
  7430. Const OCR_NO = 32648 ' not in win3.1
  7431.  
  7432. Const OIC_SAMPLE = 32512
  7433. Const OIC_HAND = 32513
  7434. Const OIC_QUES = 32514
  7435. Const OIC_BANG = 32515
  7436. Const OIC_NOTE = 32516
  7437.  
  7438. Const ORD_LANGDRIVER = 1 '  The ordinal number for the entry point of
  7439.                                 '  language drivers.
  7440.  
  7441. ' Standard Icon IDs
  7442. Const IDI_APPLICATION = 32512&
  7443. Const IDI_HAND = 32513&
  7444. Const IDI_QUESTION = 32514&
  7445. Const IDI_EXCLAMATION = 32515&
  7446. Const IDI_ASTERISK = 32516&
  7447.  
  7448. Declare Function LoadString Lib "user32" Alias "LoadStringA" (ByVal hInstance As Long, ByVal wID As Long, ByVal lpBuffer As String, ByVal nBufferMax As Long) As Long
  7449.  
  7450. ' Dialog Box Command IDs
  7451. Const IDOK = 1
  7452. Const IDCANCEL = 2
  7453. Const IDABORT = 3
  7454. Const IDRETRY = 4
  7455. Const IDIGNORE = 5
  7456. Const IDYES = 6
  7457. Const IDNO = 7
  7458.  
  7459. ' Control Manager Structures and Definitions
  7460.  
  7461. ' Edit Control Styles
  7462. Const ES_LEFT = &H0&
  7463. Const ES_CENTER = &H1&
  7464. Const ES_RIGHT = &H2&
  7465. Const ES_MULTILINE = &H4&
  7466. Const ES_UPPERCASE = &H8&
  7467. Const ES_LOWERCASE = &H10&
  7468. Const ES_PASSWORD = &H20&
  7469. Const ES_AUTOVSCROLL = &H40&
  7470. Const ES_AUTOHSCROLL = &H80&
  7471. Const ES_NOHIDESEL = &H100&
  7472. Const ES_OEMCONVERT = &H400&
  7473. Const ES_READONLY = &H800&
  7474. Const ES_WANTRETURN = &H1000&
  7475.  
  7476. ' Edit Control Notification Codes
  7477. Const EN_SETFOCUS = &H100
  7478. Const EN_KILLFOCUS = &H200
  7479. Const EN_CHANGE = &H300
  7480. Const EN_UPDATE = &H400
  7481. Const EN_ERRSPACE = &H500
  7482. Const EN_MAXTEXT = &H501
  7483. Const EN_HSCROLL = &H601
  7484. Const EN_VSCROLL = &H602
  7485.  
  7486. ' Edit Control Messages
  7487. Const EM_GETSEL = &HB0
  7488. Const EM_SETSEL = &HB1
  7489. Const EM_GETRECT = &HB2
  7490. Const EM_SETRECT = &HB3
  7491. Const EM_SETRECTNP = &HB4
  7492. Const EM_SCROLL = &HB5
  7493. Const EM_LINESCROLL = &HB6
  7494. Const EM_SCROLLCARET = &HB7
  7495. Const EM_GETMODIFY = &HB8
  7496. Const EM_SETMODIFY = &HB9
  7497. Const EM_GETLINECOUNT = &HBA
  7498. Const EM_LINEINDEX = &HBB
  7499. Const EM_SETHANDLE = &HBC
  7500. Const EM_GETHANDLE = &HBD
  7501. Const EM_GETTHUMB = &HBE
  7502. Const EM_LINELENGTH = &HC1
  7503. Const EM_REPLACESEL = &HC2
  7504. Const EM_GETLINE = &HC4
  7505. Const EM_LIMITTEXT = &HC5
  7506. Const EM_CANUNDO = &HC6
  7507. Const EM_UNDO = &HC7
  7508. Const EM_FMTLINES = &HC8
  7509. Const EM_LINEFROMCHAR = &HC9
  7510. Const EM_SETTABSTOPS = &HCB
  7511. Const EM_SETPASSWORDCHAR = &HCC
  7512. Const EM_EMPTYUNDOBUFFER = &HCD
  7513. Const EM_GETFIRSTVISIBLELINE = &HCE
  7514. Const EM_SETREADONLY = &HCF
  7515. Const EM_SETWORDBREAKPROC = &HD0
  7516. Const EM_GETWORDBREAKPROC = &HD1
  7517. Const EM_GETPASSWORDCHAR = &HD2
  7518.  
  7519. ' EDITWORDBREAKPROC code values
  7520. Const WB_LEFT = 0
  7521. Const WB_RIGHT = 1
  7522. Const WB_ISDELIMITER = 2
  7523.  
  7524. ' Button Control Styles
  7525. Const BS_PUSHBUTTON = &H0&
  7526. Const BS_DEFPUSHBUTTON = &H1&
  7527. Const BS_CHECKBOX = &H2&
  7528. Const BS_AUTOCHECKBOX = &H3&
  7529. Const BS_RADIOBUTTON = &H4&
  7530. Const BS_3STATE = &H5&
  7531. Const BS_AUTO3STATE = &H6&
  7532. Const BS_GROUPBOX = &H7&
  7533. Const BS_USERBUTTON = &H8&
  7534. Const BS_AUTORADIOBUTTON = &H9&
  7535. Const BS_OWNERDRAW = &HB&
  7536. Const BS_LEFTTEXT = &H20&
  7537.  
  7538. ' User Button Notification Codes
  7539. Const BN_CLICKED = 0
  7540. Const BN_PAINT = 1
  7541. Const BN_HILITE = 2
  7542. Const BN_UNHILITE = 3
  7543. Const BN_DISABLE = 4
  7544. Const BN_DOUBLECLICKED = 5
  7545.  
  7546. ' Button Control Messages
  7547. Const BM_GETCHECK = &HF0
  7548. Const BM_SETCHECK = &HF1
  7549. Const BM_GETSTATE = &HF2
  7550. Const BM_SETSTATE = &HF3
  7551. Const BM_SETSTYLE = &HF4
  7552.  
  7553. ' Static Control Constants
  7554. Const SS_LEFT = &H0&
  7555. Const SS_CENTER = &H1&
  7556. Const SS_RIGHT = &H2&
  7557. Const SS_ICON = &H3&
  7558. Const SS_BLACKRECT = &H4&
  7559. Const SS_GRAYRECT = &H5&
  7560. Const SS_WHITERECT = &H6&
  7561. Const SS_BLACKFRAME = &H7&
  7562. Const SS_GRAYFRAME = &H8&
  7563. Const SS_WHITEFRAME = &H9&
  7564. Const SS_USERITEM = &HA&
  7565. Const SS_SIMPLE = &HB&
  7566. Const SS_LEFTNOWORDWRAP = &HC&
  7567. Const SS_NOPREFIX = &H80           '  Don't do "&" character translation
  7568.  
  7569. ' Static Control Mesages
  7570. Const STM_SETICON = &H170
  7571. Const STM_GETICON = &H171
  7572. Const STM_MSGMAX = &H172
  7573.  
  7574. Const WC_DIALOG = 8002&
  7575.  
  7576. '  Get/SetWindowWord/Long offsets for use with WC_DIALOG windows
  7577. Const DWL_MSGRESULT = 0
  7578. Const DWL_DLGPROC = 4
  7579. Const DWL_USER = 8
  7580.  
  7581. ' Dialog Manager Routines
  7582. Declare Function IsDialogMessage Lib "user32" Alias "IsDialogMessageA" (ByVal hDlg As Long, lpMsg As MSG) As Long
  7583. Declare Function MapDialogRect Lib "user32" Alias "MapDialogRect" (ByVal hDlg As Long, lpRect As RECT) As Long
  7584. Declare Function DlgDirList Lib "user32" Alias "DlgDirListA" (ByVal hDlg As Long, ByVal lpPathSpec As String, ByVal nIDListBox As Long, ByVal nIDStaticPath As Long, ByVal wFileType As Long) As Long
  7585.  
  7586. ' DlgDirList, DlgDirListComboBox flags values
  7587. Const DDL_READWRITE = &H0
  7588. Const DDL_READONLY = &H1
  7589. Const DDL_HIDDEN = &H2
  7590. Const DDL_SYSTEM = &H4
  7591. Const DDL_DIRECTORY = &H10
  7592. Const DDL_ARCHIVE = &H20
  7593.  
  7594. Const DDL_POSTMSGS = &H2000
  7595. Const DDL_DRIVES = &H4000
  7596. Const DDL_EXCLUSIVE = &H8000
  7597.  
  7598. Declare Function DlgDirSelectEx Lib "user32" Alias "DlgDirSelectExA" (ByVal hWndDlg As Long, ByVal lpszPath As String, ByVal cbPath As Long, ByVal idListBox As Long) As Long
  7599. Declare Function DlgDirListComboBox Lib "user32" Alias "DlgDirListComboBoxA" (ByVal hDlg As Long, ByVal lpPathSpec As String, ByVal nIDComboBox As Long, ByVal nIDStaticPath As Long, ByVal wFileType As Long) As Long
  7600. Declare Function DlgDirSelectComboBoxEx Lib "user32" Alias "DlgDirSelectComboBoxExA" (ByVal hWndDlg As Long, ByVal lpszPath As String, ByVal cbPath As Long, ByVal idComboBox As Long) As Long
  7601.  
  7602. ' Dialog Styles
  7603. Const DS_ABSALIGN = &H1&
  7604. Const DS_SYSMODAL = &H2&
  7605. Const DS_LOCALEDIT = &H20          '  Edit items get Local storage.
  7606. Const DS_SETFONT = &H40            '  User specified font for Dlg controls
  7607. Const DS_MODALFRAME = &H80         '  Can be combined with WS_CAPTION
  7608. Const DS_NOIDLEMSG = &H100         '  WM_ENTERIDLE message will not be sent
  7609. Const DS_SETFOREGROUND = &H200     '  not in win3.1
  7610.  
  7611. Const DM_GETDEFID = WM_USER + 0
  7612. Const DM_SETDEFID = WM_USER + 1
  7613. Const DC_HASDEFID = &H534      '0x534B
  7614.  
  7615. ' Dialog Codes
  7616. Const DLGC_WANTARROWS = &H1              '  Control wants arrow keys
  7617. Const DLGC_WANTTAB = &H2                 '  Control wants tab keys
  7618. Const DLGC_WANTALLKEYS = &H4             '  Control wants all keys
  7619. Const DLGC_WANTMESSAGE = &H4             '  Pass message to control
  7620. Const DLGC_HASSETSEL = &H8               '  Understands EM_SETSEL message
  7621. Const DLGC_DEFPUSHBUTTON = &H10          '  Default pushbutton
  7622. Const DLGC_UNDEFPUSHBUTTON = &H20        '  Non-default pushbutton
  7623. Const DLGC_RADIOBUTTON = &H40            '  Radio button
  7624. Const DLGC_WANTCHARS = &H80              '  Want WM_CHAR messages
  7625. Const DLGC_STATIC = &H100                '  Static item: don't include
  7626. Const DLGC_BUTTON = &H2000               '  Button item: can be checked
  7627.  
  7628. Const LB_CTLCODE = 0&
  7629.  
  7630. ' Listbox Return Values
  7631. Const LB_OKAY = 0
  7632. Const LB_ERR = (-1)
  7633. Const LB_ERRSPACE = (-2)
  7634.  
  7635. ' The idStaticPath parameter to DlgDirList can have the following values
  7636. ' ORed if the list box should show other details of the files along with
  7637. ' the name of the files;
  7638. ' all other details also will be returned
  7639.  
  7640. ' Listbox Notification Codes
  7641. Const LBN_ERRSPACE = (-2)
  7642. Const LBN_SELCHANGE = 1
  7643. Const LBN_DBLCLK = 2
  7644. Const LBN_SELCANCEL = 3
  7645. Const LBN_SETFOCUS = 4
  7646. Const LBN_KILLFOCUS = 5
  7647.  
  7648. ' Listbox messages
  7649. Const LB_ADDSTRING = &H180
  7650. Const LB_INSERTSTRING = &H181
  7651. Const LB_DELETESTRING = &H182
  7652. Const LB_SELITEMRANGEEX = &H183
  7653. Const LB_RESETCONTENT = &H184
  7654. Const LB_SETSEL = &H185
  7655. Const LB_SETCURSEL = &H186
  7656. Const LB_GETSEL = &H187
  7657. Const LB_GETCURSEL = &H188
  7658. Const LB_GETTEXT = &H189
  7659. Const LB_GETTEXTLEN = &H18A
  7660. Const LB_GETCOUNT = &H18B
  7661. Const LB_SELECTSTRING = &H18C
  7662. Const LB_DIR = &H18D
  7663. Const LB_GETTOPINDEX = &H18E
  7664. Const LB_FINDSTRING = &H18F
  7665. Const LB_GETSELCOUNT = &H190
  7666. Const LB_GETSELITEMS = &H191
  7667. Const LB_SETTABSTOPS = &H192
  7668. Const LB_GETHORIZONTALEXTENT = &H193
  7669. Const LB_SETHORIZONTALEXTENT = &H194
  7670. Const LB_SETCOLUMNWIDTH = &H195
  7671. Const LB_ADDFILE = &H196
  7672. Const LB_SETTOPINDEX = &H197
  7673. Const LB_GETITEMRECT = &H198
  7674. Const LB_GETITEMDATA = &H199
  7675. Const LB_SETITEMDATA = &H19A
  7676. Const LB_SELITEMRANGE = &H19B
  7677. Const LB_SETANCHORINDEX = &H19C
  7678. Const LB_GETANCHORINDEX = &H19D
  7679. Const LB_SETCARETINDEX = &H19E
  7680. Const LB_GETCARETINDEX = &H19F
  7681. Const LB_SETITEMHEIGHT = &H1A0
  7682. Const LB_GETITEMHEIGHT = &H1A1
  7683. Const LB_FINDSTRINGEXACT = &H1A2
  7684. Const LB_SETLOCALE = &H1A5
  7685. Const LB_GETLOCALE = &H1A6
  7686. Const LB_SETCOUNT = &H1A7
  7687. Const LB_MSGMAX = &H1A8
  7688.  
  7689. ' Listbox Styles
  7690. Const LBS_NOTIFY = &H1&
  7691. Const LBS_SORT = &H2&
  7692. Const LBS_NOREDRAW = &H4&
  7693. Const LBS_MULTIPLESEL = &H8&
  7694. Const LBS_OWNERDRAWFIXED = &H10&
  7695. Const LBS_OWNERDRAWVARIABLE = &H20&
  7696. Const LBS_HASSTRINGS = &H40&
  7697. Const LBS_USETABSTOPS = &H80&
  7698. Const LBS_NOINTEGRALHEIGHT = &H100&
  7699. Const LBS_MULTICOLUMN = &H200&
  7700. Const LBS_WANTKEYBOARDINPUT = &H400&
  7701. Const LBS_EXTENDEDSEL = &H800&
  7702. Const LBS_DISABLENOSCROLL = &H1000&
  7703. Const LBS_NODATA = &H2000&
  7704. Const LBS_STANDARD = (LBS_NOTIFY Or LBS_SORT Or WS_VSCROLL Or WS_BORDER)
  7705.  
  7706. ' Combo Box return Values
  7707. Const CB_OKAY = 0
  7708. Const CB_ERR = (-1)
  7709. Const CB_ERRSPACE = (-2)
  7710.  
  7711. ' Combo Box Notification Codes
  7712. Const CBN_ERRSPACE = (-1)
  7713. Const CBN_SELCHANGE = 1
  7714. Const CBN_DBLCLK = 2
  7715. Const CBN_SETFOCUS = 3
  7716. Const CBN_KILLFOCUS = 4
  7717. Const CBN_EDITCHANGE = 5
  7718. Const CBN_EDITUPDATE = 6
  7719. Const CBN_DROPDOWN = 7
  7720. Const CBN_CLOSEUP = 8
  7721. Const CBN_SELENDOK = 9
  7722. Const CBN_SELENDCANCEL = 10
  7723.  
  7724. ' Combo Box styles
  7725. Const CBS_SIMPLE = &H1&
  7726. Const CBS_DROPDOWN = &H2&
  7727. Const CBS_DROPDOWNLIST = &H3&
  7728. Const CBS_OWNERDRAWFIXED = &H10&
  7729. Const CBS_OWNERDRAWVARIABLE = &H20&
  7730. Const CBS_AUTOHSCROLL = &H40&
  7731. Const CBS_OEMCONVERT = &H80&
  7732. Const CBS_SORT = &H100&
  7733. Const CBS_HASSTRINGS = &H200&
  7734. Const CBS_NOINTEGRALHEIGHT = &H400&
  7735. Const CBS_DISABLENOSCROLL = &H800&
  7736.  
  7737. ' Combo Box messages
  7738. Const CB_GETEDITSEL = &H140
  7739. Const CB_LIMITTEXT = &H141
  7740. Const CB_SETEDITSEL = &H142
  7741. Const CB_ADDSTRING = &H143
  7742. Const CB_DELETESTRING = &H144
  7743. Const CB_DIR = &H145
  7744. Const CB_GETCOUNT = &H146
  7745. Const CB_GETCURSEL = &H147
  7746. Const CB_GETLBTEXT = &H148
  7747. Const CB_GETLBTEXTLEN = &H149
  7748. Const CB_INSERTSTRING = &H14A
  7749. Const CB_RESETCONTENT = &H14B
  7750. Const CB_FINDSTRING = &H14C
  7751. Const CB_SELECTSTRING = &H14D
  7752. Const CB_SETCURSEL = &H14E
  7753. Const CB_SHOWDROPDOWN = &H14F
  7754. Const CB_GETITEMDATA = &H150
  7755. Const CB_SETITEMDATA = &H151
  7756. Const CB_GETDROPPEDCONTROLRECT = &H152
  7757. Const CB_SETITEMHEIGHT = &H153
  7758. Const CB_GETITEMHEIGHT = &H154
  7759. Const CB_SETEXTENDEDUI = &H155
  7760. Const CB_GETEXTENDEDUI = &H156
  7761. Const CB_GETDROPPEDSTATE = &H157
  7762. Const CB_FINDSTRINGEXACT = &H158
  7763. Const CB_SETLOCALE = &H159
  7764. Const CB_GETLOCALE = &H15A
  7765. Const CB_MSGMAX = &H15B
  7766.  
  7767. ' Scroll Bar Styles
  7768. Const SBS_HORZ = &H0&
  7769. Const SBS_VERT = &H1&
  7770. Const SBS_TOPALIGN = &H2&
  7771. Const SBS_LEFTALIGN = &H2&
  7772. Const SBS_BOTTOMALIGN = &H4&
  7773. Const SBS_RIGHTALIGN = &H4&
  7774. Const SBS_SIZEBOXTOPLEFTALIGN = &H2&
  7775. Const SBS_SIZEBOXBOTTOMRIGHTALIGN = &H4&
  7776. Const SBS_SIZEBOX = &H8&
  7777.  
  7778. '  Scroll bar messages
  7779. Const SBM_SETPOS = &HE0 ' not in win3.1
  7780. Const SBM_GETPOS = &HE1 ' not in win3.1
  7781. Const SBM_SETRANGE = &HE2 ' not in win3.1
  7782. Const SBM_SETRANGEREDRAW = &HE6 ' not in win3.1
  7783. Const SBM_GETRANGE = &HE3 ' not in win3.1
  7784. Const SBM_ENABLE_ARROWS = &HE4 ' not in win3.1
  7785.  
  7786. Const MDIS_ALLCHILDSTYLES = &H1
  7787.  
  7788. ' wParam values for WM_MDITILE and WM_MDICASCADE messages.
  7789. Const MDITILE_VERTICAL = &H0
  7790. Const MDITILE_HORIZONTAL = &H1
  7791. Const MDITILE_SKIPDISABLED = &H2
  7792.  
  7793. Type MDICREATESTRUCT
  7794.         szClass As String
  7795.         szTitle As String
  7796.         hOwner As Long
  7797.         x As Long
  7798.         y As Long
  7799.         cx As Long
  7800.         cy As Long
  7801.         style As Long
  7802.         lParam As Long
  7803. End Type
  7804.  
  7805. Type CLIENTCREATESTRUCT
  7806.         hWindowMenu As Long
  7807.         idFirstChild As Long
  7808. End Type
  7809.  
  7810. Declare Function DefFrameProc Lib "user32" Alias "DefFrameProcA" (ByVal hwnd As Long, ByVal hWndMDIClient As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
  7811. Declare Function DefMDIChildProc Lib "user32" Alias "DefMDIChildProcA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
  7812.  
  7813. Declare Function TranslateMDISysAccel Lib "user32" Alias "TranslateMDISysAccel" (ByVal hWndClient As Long, lpMsg As MSG) As Long
  7814.  
  7815. Declare Function ArrangeIconicWindows Lib "user32" Alias "ArrangeIconicWindows" (ByVal hwnd As Long) As Long
  7816.  
  7817. Declare Function CreateMDIWindow Lib "user32" Alias "CreateMDIWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String, ByVal dwStyle As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hWndParent As Long, ByVal hInstance As Long, ByVal lParam As Long) As Long
  7818.  
  7819. '  Help engine section.
  7820.  
  7821. Type MULTIKEYHELP
  7822.         mkSize As Long
  7823.         mkKeylist As Byte
  7824.         szKeyphrase As String * 253 ' Array length is arbitrary; may be changed
  7825. End Type
  7826.  
  7827. Type HELPWININFO
  7828.         wStructSize As Long
  7829.         x As Long
  7830.         y As Long
  7831.         dx As Long
  7832.         dy As Long
  7833.         wMax As Long
  7834.         rgchMember As String * 2
  7835. End Type
  7836.  
  7837. ' Commands to pass WinHelp()
  7838. Const HELP_CONTEXT = &H1          '  Display topic in ulTopic
  7839. Const HELP_QUIT = &H2             '  Terminate help
  7840. Const HELP_INDEX = &H3            '  Display index
  7841. Const HELP_CONTENTS = &H3&
  7842. Const HELP_HELPONHELP = &H4       '  Display help on using help
  7843. Const HELP_SETINDEX = &H5         '  Set current Index for multi index help
  7844. Const HELP_SETCONTENTS = &H5&
  7845. Const HELP_CONTEXTPOPUP = &H8&
  7846. Const HELP_FORCEFILE = &H9&
  7847. Const HELP_KEY = &H101            '  Display topic for keyword in offabData
  7848. Const HELP_COMMAND = &H102&
  7849. Const HELP_PARTIALKEY = &H105&
  7850. Const HELP_MULTIKEY = &H201&
  7851. Const HELP_SETWINPOS = &H203&
  7852.  
  7853. Declare Function WinHelp Lib "user32" Alias "WinHelpA" (ByVal hwnd As Long, ByVal lpHelpFile As String, ByVal wCommand As Long, ByVal dwData As Long) As Long
  7854.  
  7855. ' Parameter for SystemParametersInfo()
  7856. Const SPI_GETBEEP = 1
  7857. Const SPI_SETBEEP = 2
  7858. Const SPI_GETMOUSE = 3
  7859. Const SPI_SETMOUSE = 4
  7860. Const SPI_GETBORDER = 5
  7861. Const SPI_SETBORDER = 6
  7862. Const SPI_GETKEYBOARDSPEED = 10
  7863. Const SPI_SETKEYBOARDSPEED = 11
  7864. Const SPI_LANGDRIVER = 12
  7865. Const SPI_ICONHORIZONTALSPACING = 13
  7866. Const SPI_GETSCREENSAVETIMEOUT = 14
  7867. Const SPI_SETSCREENSAVETIMEOUT = 15
  7868. Const SPI_GETSCREENSAVEACTIVE = 16
  7869. Const SPI_SETSCREENSAVEACTIVE = 17
  7870. Const SPI_GETGRIDGRANULARITY = 18
  7871. Const SPI_SETGRIDGRANULARITY = 19
  7872. Const SPI_SETDESKWALLPAPER = 20
  7873. Const SPI_SETDESKPATTERN = 21
  7874. Const SPI_GETKEYBOARDDELAY = 22
  7875. Const SPI_SETKEYBOARDDELAY = 23
  7876. Const SPI_ICONVERTICALSPACING = 24
  7877. Const SPI_GETICONTITLEWRAP = 25
  7878. Const SPI_SETICONTITLEWRAP = 26
  7879. Const SPI_GETMENUDROPALIGNMENT = 27
  7880. Const SPI_SETMENUDROPALIGNMENT = 28
  7881. Const SPI_SETDOUBLECLKWIDTH = 29
  7882. Const SPI_SETDOUBLECLKHEIGHT = 30
  7883. Const SPI_GETICONTITLELOGFONT = 31
  7884. Const SPI_SETDOUBLECLICKTIME = 32
  7885. Const SPI_SETMOUSEBUTTONSWAP = 33
  7886. Const SPI_SETICONTITLELOGFONT = 34
  7887. Const SPI_GETFASTTASKSWITCH = 35
  7888. Const SPI_SETFASTTASKSWITCH = 36
  7889. Const SPI_SETDRAGFULLWINDOWS = 37
  7890. Const SPI_GETDRAGFULLWINDOWS = 38
  7891. Const SPI_GETNONCLIENTMETRICS = 41
  7892. Const SPI_SETNONCLIENTMETRICS = 42
  7893. Const SPI_GETMINIMIZEDMETRICS = 43
  7894. Const SPI_SETMINIMIZEDMETRICS = 44
  7895. Const SPI_GETICONMETRICS = 45
  7896. Const SPI_SETICONMETRICS = 46
  7897. Const SPI_SETWORKAREA = 47
  7898. Const SPI_GETWORKAREA = 48
  7899. Const SPI_SETPENWINDOWS = 49
  7900. Const SPI_GETFILTERKEYS = 50
  7901. Const SPI_SETFILTERKEYS = 51
  7902. Const SPI_GETTOGGLEKEYS = 52
  7903. Const SPI_SETTOGGLEKEYS = 53
  7904. Const SPI_GETMOUSEKEYS = 54
  7905. Const SPI_SETMOUSEKEYS = 55
  7906. Const SPI_GETSHOWSOUNDS = 56
  7907. Const SPI_SETSHOWSOUNDS = 57
  7908. Const SPI_GETSTICKYKEYS = 58
  7909. Const SPI_SETSTICKYKEYS = 59
  7910. Const SPI_GETACCESSTIMEOUT = 60
  7911. Const SPI_SETACCESSTIMEOUT = 61
  7912. Const SPI_GETSERIALKEYS = 62
  7913. Const SPI_SETSERIALKEYS = 63
  7914. Const SPI_GETSOUNDSENTRY = 64
  7915. Const SPI_SETSOUNDSENTRY = 65
  7916. Const SPI_GETHIGHCONTRAST = 66
  7917. Const SPI_SETHIGHCONTRAST = 67
  7918. Const SPI_GETKEYBOARDPREF = 68
  7919. Const SPI_SETKEYBOARDPREF = 69
  7920. Const SPI_GETSCREENREADER = 70
  7921. Const SPI_SETSCREENREADER = 71
  7922. Const SPI_GETANIMATION = 72
  7923. Const SPI_SETANIMATION = 73
  7924. Const SPI_GETFONTSMOOTHING = 74
  7925. Const SPI_SETFONTSMOOTHING = 75
  7926. Const SPI_SETDRAGWIDTH = 76
  7927. Const SPI_SETDRAGHEIGHT = 77
  7928. Const SPI_SETHANDHELD = 78
  7929. Const SPI_GETLOWPOWERTIMEOUT = 79
  7930. Const SPI_GETPOWEROFFTIMEOUT = 80
  7931. Const SPI_SETLOWPOWERTIMEOUT = 81
  7932. Const SPI_SETPOWEROFFTIMEOUT = 82
  7933. Const SPI_GETLOWPOWERACTIVE = 83
  7934. Const SPI_GETPOWEROFFACTIVE = 84
  7935. Const SPI_SETLOWPOWERACTIVE = 85
  7936. Const SPI_SETPOWEROFFACTIVE = 86
  7937. Const SPI_SETCURSORS = 87
  7938. Const SPI_SETICONS = 88
  7939. Const SPI_GETDEFAULTINPUTLANG = 89
  7940. Const SPI_SETDEFAULTINPUTLANG = 90
  7941. Const SPI_SETLANGTOGGLE = 91
  7942. Const SPI_GETWINDOWSEXTENSION = 92
  7943. Const SPI_SETMOUSETRAILS = 93
  7944. Const SPI_GETMOUSETRAILS = 94
  7945. Const SPI_SCREENSAVERRUNNING = 97
  7946.  
  7947. ' SystemParametersInfo flags
  7948. Const SPIF_UPDATEINIFILE = &H1
  7949. Const SPIF_SENDWININICHANGE = &H2
  7950.  
  7951. Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByRef lpvParam As Any, ByVal fuWinIni As Long) As Long
  7952.  
  7953. '  DDE window messages
  7954. Const WM_DDE_FIRST = &H3E0
  7955. Const WM_DDE_INITIATE = (WM_DDE_FIRST)
  7956. Const WM_DDE_TERMINATE = (WM_DDE_FIRST + 1)
  7957. Const WM_DDE_ADVISE = (WM_DDE_FIRST + 2)
  7958. Const WM_DDE_UNADVISE = (WM_DDE_FIRST + 3)
  7959. Const WM_DDE_ACK = (WM_DDE_FIRST + 4)
  7960. Const WM_DDE_DATA = (WM_DDE_FIRST + 5)
  7961. Const WM_DDE_REQUEST = (WM_DDE_FIRST + 6)
  7962. Const WM_DDE_POKE = (WM_DDE_FIRST + 7)
  7963. Const WM_DDE_EXECUTE = (WM_DDE_FIRST + 8)
  7964. Const WM_DDE_LAST = (WM_DDE_FIRST + 8)
  7965.  
  7966. ' *****************************************************************************                                                                             *
  7967. ' * dde.h -       Dynamic Data Exchange structures and definitions              *
  7968. ' *                                                                             *
  7969. ' * Copyright (c) 1993-1995, Microsoft Corp.        All rights reserved              *
  7970. ' *                                                                             *
  7971. ' \*****************************************************************************/
  7972.  
  7973.  
  7974. ' ----------------------------------------------------------------------------
  7975. '        DDEACK structure
  7976. '         Structure of wStatus (LOWORD(lParam)) in WM_DDE_ACK message
  7977. '        sent in response to a WM_DDE_DATA, WM_DDE_REQUEST, WM_DDE_POKE,
  7978. '        WM_DDE_ADVISE, or WM_DDE_UNADVISE message.
  7979. ' ----------------------------------------------------------------------------*/
  7980.  
  7981. Type DDEACK
  7982.         bAppReturnCode As Integer
  7983.         Reserved As Integer
  7984.         fbusy As Integer
  7985.         fack As Integer
  7986. End Type
  7987.  
  7988. ' ----------------------------------------------------------------------------
  7989. '        DDEADVISE structure
  7990. '
  7991. '         WM_DDE_ADVISE parameter structure for hOptions (LOWORD(lParam))
  7992. '
  7993. ' ----------------------------------------------------------------------------*/
  7994.  
  7995. Type DDEADVISE
  7996.         Reserved As Integer
  7997.         fDeferUpd As Integer
  7998.         fAckReq As Integer
  7999.         cfFormat As Integer
  8000. End Type
  8001.  
  8002.  
  8003. ' ----------------------------------------------------------------------------
  8004. '        DDEDATA structure
  8005. '
  8006. '        WM_DDE_DATA parameter structure for hData (LOWORD(lParam)).
  8007. '        The actual size of this structure depends on the size of
  8008. '        the Value array.
  8009. '
  8010. ' ----------------------------------------------------------------------------*/
  8011.  
  8012. Type DDEDATA
  8013.         unused As Integer
  8014.         fresponse As Integer
  8015.         fRelease As Integer
  8016.         Reserved As Integer
  8017.         fAckReq As Integer
  8018.         cfFormat As Integer
  8019.         Value(1) As Byte
  8020. End Type
  8021.  
  8022.  
  8023. ' ----------------------------------------------------------------------------
  8024. '         DDEPOKE structure
  8025. '
  8026. '         WM_DDE_POKE parameter structure for hData (LOWORD(lParam)).
  8027. '        The actual size of this structure depends on the size of
  8028. '        the Value array.
  8029. '
  8030. ' ----------------------------------------------------------------------------*/
  8031.  
  8032. Type DDEPOKE
  8033.         unused As Integer
  8034.         fRelease As Integer
  8035.         fReserved As Integer
  8036.         cfFormat As Integer
  8037.         Value(1) As Byte
  8038. End Type
  8039.  
  8040. ' ----------------------------------------------------------------------------
  8041. ' The following typedef's were used in previous versions of the Windows SDK.
  8042. ' They are still valid.  The above typedef's define exactly the same structures
  8043. ' as those below.  The above typedef names are recommended, however, as they
  8044. ' are more meaningful.
  8045.  
  8046. ' Note that the DDEPOKE structure typedef'ed in earlier versions of DDE.H did
  8047. ' not correctly define the bit positions.
  8048. ' ----------------------------------------------------------------------------*/
  8049.  
  8050. Type DDELN
  8051.         unused As Integer
  8052.         fRelease As Integer
  8053.         fDeferUpd As Integer
  8054.         fAckReq As Integer
  8055.         cfFormat As Integer
  8056. End Type
  8057.  
  8058. Type DDEUP
  8059.         unused As Integer
  8060.         fAck As Integer
  8061.         fRelease As Integer
  8062.         fReserved As Integer
  8063.         fAckReq As Integer
  8064.         cfFormat As Integer
  8065.         rgb(1) As Byte
  8066. End Type
  8067.  
  8068. Declare Function DdeSetQualityOfService Lib "user32" Alias "DdeSetQualityOfService" (ByVal hWndClient As Long, pqosNew As SECURITY_QUALITY_OF_SERVICE, pqosPrev As SECURITY_QUALITY_OF_SERVICE) As Long
  8069. Declare Function ImpersonateDdeClientWindow Lib "user32" Alias "ImpersonateDdeClientWindow" (ByVal hWndClient As Long, ByVal hWndServer As Long) As Long
  8070. Declare Function PackDDElParam Lib "user32" Alias "PackDDElParam" (ByVal msg As Long, ByVal uiLo As Long, ByVal uiHi As Long) As Long
  8071. Declare Function UnpackDDElParam Lib "user32" Alias "UnpackDDElParam" (ByVal msg As Long, ByVal lParam As Long, puiLo As Long, puiHi As Long) As Long
  8072. Declare Function FreeDDElParam Lib "user32" Alias "FreeDDElParam" (ByVal msg As Long, ByVal lParam As Long) As Long
  8073. Declare Function ReuseDDElParam Lib "user32" Alias "ReuseDDElParam" (ByVal lParam As Long, ByVal msgIn As Long, ByVal msgOut As Long, ByVal uiLo As Long, ByVal uiHi As Long) As Long
  8074.  
  8075. Type HSZPAIR
  8076.         hszSvc As Long
  8077.         hszTopic As Long
  8078. End Type
  8079.  
  8080. '//
  8081. '// Quality Of Service
  8082. '//
  8083.  
  8084. Type SECURITY_QUALITY_OF_SERVICE
  8085.     Length As Long
  8086.     Impersonationlevel As Integer
  8087.     ContextTrackingMode As Integer
  8088.     EffectiveOnly As Long
  8089. End Type
  8090.     
  8091. Type CONVCONTEXT
  8092.         cb As Long
  8093.         wFlags As Long
  8094.         wCountryID As Long
  8095.         iCodePage As Long
  8096.         dwLangID As Long
  8097.         dwSecurity As Long
  8098.         qos As SECURITY_QUALITY_OF_SERVICE
  8099. End Type
  8100.  
  8101. Type CONVINFO
  8102.         cb As Long
  8103.         hUser As Long
  8104.         hConvPartner As Long
  8105.         hszSvcPartner As Long
  8106.         hszServiceReq As Long
  8107.         hszTopic As Long
  8108.         hszItem As Long
  8109.         wFmt As Long
  8110.         wType As Long
  8111.         wStatus As Long
  8112.         wConvst As Long
  8113.         wLastError As Long
  8114.         hConvList As Long
  8115.         ConvCtxt As CONVCONTEXT
  8116.         hwnd As Long
  8117.         hwndPartner As Long
  8118. End Type
  8119.  
  8120. '  conversation states (usState)
  8121. Const XST_NULL = 0  '  quiescent states
  8122. Const XST_INCOMPLETE = 1
  8123. Const XST_CONNECTED = 2
  8124. Const XST_INIT1 = 3  '  mid-initiation states
  8125. Const XST_INIT2 = 4
  8126. Const XST_REQSENT = 5  '  active conversation states
  8127. Const XST_DATARCVD = 6
  8128. Const XST_POKESENT = 7
  8129. Const XST_POKEACKRCVD = 8
  8130. Const XST_EXECSENT = 9
  8131. Const XST_EXECACKRCVD = 10
  8132. Const XST_ADVSENT = 11
  8133. Const XST_UNADVSENT = 12
  8134. Const XST_ADVACKRCVD = 13
  8135. Const XST_UNADVACKRCVD = 14
  8136. Const XST_ADVDATASENT = 15
  8137. Const XST_ADVDATAACKRCVD = 16
  8138.  
  8139. '  used in LOWORD(dwData1) of XTYP_ADVREQ callbacks...
  8140. Const CADV_LATEACK = &HFFFF
  8141.  
  8142. '  conversation status bits (fsStatus)
  8143. Const ST_CONNECTED = &H1
  8144. Const ST_ADVISE = &H2
  8145. Const ST_ISLOCAL = &H4
  8146. Const ST_BLOCKED = &H8
  8147. Const ST_CLIENT = &H10
  8148. Const ST_TERMINATED = &H20
  8149. Const ST_INLIST = &H40
  8150. Const ST_BLOCKNEXT = &H80
  8151. Const ST_ISSELF = &H100
  8152.  
  8153. '  DDE constants for wStatus field
  8154. Const DDE_FACK = &H8000
  8155. Const DDE_FBUSY = &H4000
  8156. Const DDE_FDEFERUPD = &H4000
  8157. Const DDE_FACKREQ = &H8000
  8158. Const DDE_FRELEASE = &H2000
  8159. Const DDE_FREQUESTED = &H1000
  8160. Const DDE_FAPPSTATUS = &HFF
  8161. Const DDE_FNOTPROCESSED = &H0
  8162.  
  8163. Const DDE_FACKRESERVED = (Not (DDE_FACK Or DDE_FBUSY Or DDE_FAPPSTATUS))
  8164. Const DDE_FADVRESERVED = (Not (DDE_FACKREQ Or DDE_FDEFERUPD))
  8165. Const DDE_FDATRESERVED = (Not (DDE_FACKREQ Or DDE_FRELEASE Or DDE_FREQUESTED))
  8166. Const DDE_FPOKRESERVED = (Not (DDE_FRELEASE))
  8167.  
  8168. '  message filter hook types
  8169. Const MSGF_DDEMGR = &H8001
  8170.  
  8171. '  codepage constants
  8172. Const CP_WINANSI = 1004  '  default codepage for windows old DDE convs.
  8173. Const CP_WINUNICODE = 1200
  8174.  
  8175. '  transaction types
  8176. Const XTYPF_NOBLOCK = &H2     '  CBR_BLOCK will not work
  8177. Const XTYPF_NODATA = &H4     '  DDE_FDEFERUPD
  8178. Const XTYPF_ACKREQ = &H8     '  DDE_FACKREQ
  8179.  
  8180. Const XCLASS_MASK = &HFC00
  8181. Const XCLASS_BOOL = &H1000
  8182. Const XCLASS_DATA = &H2000
  8183. Const XCLASS_FLAGS = &H4000
  8184. Const XCLASS_NOTIFICATION = &H8000
  8185.  
  8186. Const XTYP_ERROR = (&H0 Or XCLASS_NOTIFICATION Or XTYPF_NOBLOCK)
  8187. Const XTYP_ADVDATA = (&H10 Or XCLASS_FLAGS)
  8188. Const XTYP_ADVREQ = (&H20 Or XCLASS_DATA Or XTYPF_NOBLOCK)
  8189. Const XTYP_ADVSTART = (&H30 Or XCLASS_BOOL)
  8190. Const XTYP_ADVSTOP = (&H40 Or XCLASS_NOTIFICATION)
  8191. Const XTYP_EXECUTE = (&H50 Or XCLASS_FLAGS)
  8192. Const XTYP_CONNECT = (&H60 Or XCLASS_BOOL Or XTYPF_NOBLOCK)
  8193. Const XTYP_CONNECT_CONFIRM = (&H70 Or XCLASS_NOTIFICATION Or XTYPF_NOBLOCK)
  8194. Const XTYP_XACT_COMPLETE = (&H80 Or XCLASS_NOTIFICATION)
  8195. Const XTYP_POKE = (&H90 Or XCLASS_FLAGS)
  8196. Const XTYP_REGISTER = (&HA0 Or XCLASS_NOTIFICATION Or XTYPF_NOBLOCK)
  8197. Const XTYP_REQUEST = (&HB0 Or XCLASS_DATA)
  8198. Const XTYP_DISCONNECT = (&HC0 Or XCLASS_NOTIFICATION Or XTYPF_NOBLOCK)
  8199. Const XTYP_UNREGISTER = (&HD0 Or XCLASS_NOTIFICATION Or XTYPF_NOBLOCK)
  8200. Const XTYP_WILDCONNECT = (&HE0 Or XCLASS_DATA Or XTYPF_NOBLOCK)
  8201.  
  8202. Const XTYP_MASK = &HF0
  8203. Const XTYP_SHIFT = 4  '  shift to turn XTYP_ into an index
  8204.  
  8205. '  Timeout constants
  8206. Const TIMEOUT_ASYNC = &HFFFF
  8207.  
  8208. '  Transaction ID constants
  8209. Const QID_SYNC = &HFFFF
  8210.  
  8211. ' Public strings used in DDE
  8212. Const SZDDESYS_TOPIC = "System"
  8213. Const SZDDESYS_ITEM_TOPICS = "Topics"
  8214. Const SZDDESYS_ITEM_SYSITEMS = "SysItems"
  8215. Const SZDDESYS_ITEM_RTNMSG = "ReturnMessage"
  8216. Const SZDDESYS_ITEM_STATUS = "Status"
  8217. Const SZDDESYS_ITEM_FORMATS = "Formats"
  8218. Const SZDDESYS_ITEM_HELP = "Help"
  8219. Const SZDDE_ITEM_ITEMLIST = "TopicItemList"
  8220.  
  8221. Const CBR_BLOCK = &HFFFF
  8222.  
  8223. ' Callback filter flags for use with standard apps.
  8224. Const CBF_FAIL_SELFCONNECTIONS = &H1000
  8225. Const CBF_FAIL_CONNECTIONS = &H2000
  8226. Const CBF_FAIL_ADVISES = &H4000
  8227. Const CBF_FAIL_EXECUTES = &H8000
  8228. Const CBF_FAIL_POKES = &H10000
  8229. Const CBF_FAIL_REQUESTS = &H20000
  8230. Const CBF_FAIL_ALLSVRXACTIONS = &H3F000
  8231.  
  8232. Const CBF_SKIP_CONNECT_CONFIRMS = &H40000
  8233. Const CBF_SKIP_REGISTRATIONS = &H80000
  8234. Const CBF_SKIP_UNREGISTRATIONS = &H100000
  8235. Const CBF_SKIP_DISCONNECTS = &H200000
  8236. Const CBF_SKIP_ALLNOTIFICATIONS = &H3C0000
  8237.  
  8238. ' Application command flags
  8239. Const APPCMD_CLIENTONLY = &H10&
  8240. Const APPCMD_FILTERINITS = &H20&
  8241. Const APPCMD_MASK = &HFF0&
  8242.  
  8243. ' Application classification flags
  8244. Const APPCLASS_STANDARD = &H0&
  8245. Const APPCLASS_MASK = &HF&
  8246.  
  8247. Declare Function DdeUninitialize Lib "user32" Alias "DdeUninitialize" (ByVal idInst As Long) As Long
  8248.  
  8249. ' conversation enumeration functions
  8250. Declare Function DdeConnectList Lib "user32" Alias "DdeConnectList" (ByVal idInst As Long, ByVal hszService As Long, ByVal hszTopic As Long, ByVal hConvList As Long, pCC As CONVCONTEXT) As Long
  8251. Declare Function DdeQueryNextServer Lib "user32" Alias "DdeQueryNextServer" (ByVal hConvList As Long, ByVal hConvPrev As Long) As Long
  8252. Declare Function DdeDisconnectList Lib "user32" Alias "DdeDisconnectList" (ByVal hConvList As Long) As Long
  8253.  
  8254. ' conversation control functions
  8255. Declare Function DdeConnect Lib "user32" Alias "DdeConnect" (ByVal idInst As Long, ByVal hszService As Long, ByVal hszTopic As Long, pCC As CONVCONTEXT) As Long
  8256. Declare Function DdeDisconnect Lib "user32" Alias "DdeDisconnect" (ByVal hConv As Long) As Long
  8257. Declare Function DdeReconnect Lib "user32" Alias "DdeReconnect" (ByVal hConv As Long) As Long
  8258. Declare Function DdeQueryConvInfo Lib "user32" Alias "DdeQueryConvInfo" (ByVal hConv As Long, ByVal idTransaction As Long, pConvInfo As CONVINFO) As Long
  8259. Declare Function DdeSetUserHandle Lib "user32" Alias "DdeSetUserHandle" (ByVal hConv As Long, ByVal id As Long, ByVal hUser As Long) As Long
  8260. Declare Function DdeAbandonTransaction Lib "user32" Alias "DdeAbandonTransaction" (ByVal idInst As Long, ByVal hConv As Long, ByVal idTransaction As Long) As Long
  8261.  
  8262. ' app server interface functions
  8263. Declare Function DdePostAdvise Lib "user32" Alias "DdePostAdvise" (ByVal idInst As Long, ByVal hszTopic As Long, ByVal hszItem As Long) As Long
  8264. Declare Function DdeEnableCallback Lib "user32" Alias "DdeEnableCallback" (ByVal idInst As Long, ByVal hConv As Long, ByVal wCmd As Long) As Long
  8265. Declare Function DdeImpersonateClient Lib "user32" Alias "DdeImpersonateClient" (ByVal hConv As Long) As Long
  8266.  
  8267. Const EC_ENABLEALL = 0
  8268. Const EC_ENABLEONE = ST_BLOCKNEXT
  8269. Const EC_DISABLE = ST_BLOCKED
  8270. Const EC_QUERYWAITING = 2
  8271.  
  8272. Declare Function DdeNameService Lib "user32" Alias "DdeNameService" (ByVal idInst As Long, ByVal hsz1 As Long, ByVal hsz2 As Long, ByVal afCmd As Long) As Long
  8273.  
  8274. Const DNS_REGISTER = &H1
  8275. Const DNS_UNREGISTER = &H2
  8276. Const DNS_FILTERON = &H4
  8277. Const DNS_FILTEROFF = &H8
  8278.  
  8279. ' app client interface functions
  8280. Declare Function DdeClientTransaction Lib "user32" Alias "DdeClientTransaction" (pData As Byte, ByVal cbData As Long, ByVal hConv As Long, ByVal hszItem As Long, ByVal wFmt As Long, ByVal wType As Long, ByVal dwTimeout As Long, pdwResult As Long) As Long
  8281.  
  8282. ' data transfer functions
  8283. Declare Function DdeCreateDataHandle Lib "user32" Alias "DdeCreateDataHandle" (ByVal idInst As Long, pSrc As Byte, ByVal cb As Long, ByVal cbOff As Long, ByVal hszItem As Long, ByVal wFmt As Long, ByVal afCmd As Long) As Long
  8284. Declare Function DdeAddData Lib "user32" Alias "DdeAddDataA" (ByVal hData As Long, pSrc As Byte, ByVal cb As Long, ByVal cbOff As Long) As Long
  8285. Declare Function DdeGetData Lib "user32" Alias "DdeGetDataA" (ByVal hData As Long, pDst As Byte, ByVal cbMax As Long, ByVal cbOff As Long) As Long
  8286. Declare Function DdeAccessData Lib "user32" Alias "DdeAccessDataA" (ByVal hData As Long, pcbDataSize As Long) As Long
  8287. Declare Function DdeUnaccessData Lib "user32" Alias "DdeUnaccessDataA" (ByVal hData As Long) As Long
  8288. Declare Function DdeFreeDataHandle Lib "user32" Alias "DdeFreeDataHandle" (ByVal hData As Long) As Long
  8289.  
  8290. Const HDATA_APPOWNED = &H1
  8291.  
  8292. Declare Function DdeGetLastError Lib "user32" Alias "DdeGetLastError" (ByVal idInst As Long) As Long
  8293.  
  8294. Const DMLERR_NO_ERROR = 0                           '  must be 0
  8295.  
  8296. Const DMLERR_FIRST = &H4000
  8297.  
  8298. Const DMLERR_ADVACKTIMEOUT = &H4000
  8299. Const DMLERR_BUSY = &H4001
  8300. Const DMLERR_DATAACKTIMEOUT = &H4002
  8301. Const DMLERR_DLL_NOT_INITIALIZED = &H4003
  8302. Const DMLERR_DLL_USAGE = &H4004
  8303. Const DMLERR_EXECACKTIMEOUT = &H4005
  8304. Const DMLERR_INVALIDPARAMETER = &H4006
  8305. Const DMLERR_LOW_MEMORY = &H4007
  8306. Const DMLERR_MEMORY_ERROR = &H4008
  8307. Const DMLERR_NOTPROCESSED = &H4009
  8308. Const DMLERR_NO_CONV_ESTABLISHED = &H400A
  8309. Const DMLERR_POKEACKTIMEOUT = &H400B
  8310. Const DMLERR_POSTMSG_FAILED = &H400C
  8311. Const DMLERR_REENTRANCY = &H400D
  8312. Const DMLERR_SERVER_DIED = &H400E
  8313. Const DMLERR_SYS_ERROR = &H400F
  8314. Const DMLERR_UNADVACKTIMEOUT = &H4010
  8315. Const DMLERR_UNFOUND_QUEUE_ID = &H4011
  8316.  
  8317. Const DMLERR_LAST = &H4011
  8318.  
  8319. Declare Function DdeCreateStringHandle Lib "user32" Alias "DdeCreateStringHandleA" (ByVal idInst As Long, ByVal psz As String, ByVal iCodePage As Long) As Long
  8320.  
  8321. Declare Function DdeQueryString Lib "user32" Alias "DdeQueryStringA" (ByVal idInst As Long, ByVal hsz As Long, ByVal psz As String, ByVal cchMax As Long, ByVal iCodePage As Long) As Long
  8322.  
  8323. Declare Function DdeFreeStringHandle Lib "user32" Alias "DdeFreeStringHandle" (ByVal idInst As Long, ByVal hsz As Long) As Long
  8324. Declare Function DdeKeepStringHandle Lib "user32" Alias "DdeKeepStringHandle" (ByVal idInst As Long, ByVal hsz As Long) As Long
  8325. Declare Function DdeCmpStringHandles Lib "user32" Alias "DdeCmpStringHandles" (ByVal hsz1 As Long, ByVal hsz2 As Long) As Long
  8326.  
  8327. Type DDEML_MSG_HOOK_DATA    '  new for NT
  8328.         uiLo As Long  '  unpacked lo and hi parts of lParam
  8329.         uiHi As Long
  8330.         cbData As Long   '  amount of data in message, if any. May be > than 32 bytes.
  8331.         Data(8) As Long  '  data peeking by DDESPY is limited to 32 bytes.
  8332. End Type
  8333.  
  8334. Type MONMSGSTRUCT
  8335.         cb As Long
  8336.         hwndTo As Long
  8337.         dwTime As Long
  8338.         htask As Long
  8339.         wMsg As Long
  8340.         wParam As Long
  8341.         lParam As Long
  8342.         dmhd As DDEML_MSG_HOOK_DATA       '  new for NT
  8343. End Type
  8344.  
  8345. Type MONCBSTRUCT
  8346.         cb As Long
  8347.         dwTime As Long
  8348.         htask As Long
  8349.         dwRet As Long
  8350.         wType As Long
  8351.         wFmt As Long
  8352.         hConv As Long
  8353.         hsz1 As Long
  8354.         hsz2 As Long
  8355.         hData As Long
  8356.         dwData1 As Long
  8357.         dwData2 As Long
  8358.         cc As CONVCONTEXT                 '  new for NT for XTYP_CONNECT callbacks
  8359.         cbData As Long                  '  new for NT for data peeking
  8360.         Data(8) As Long                 '  new for NT for data peeking
  8361. End Type
  8362.  
  8363. Type MONHSZSTRUCT
  8364.         cb As Long
  8365.         fsAction As Long '  MH_ value
  8366.         dwTime As Long
  8367.         hsz As Long
  8368.         htask As Long
  8369.         str As Byte
  8370. End Type
  8371.  
  8372. Const MH_CREATE = 1
  8373. Const MH_KEEP = 2
  8374. Const MH_DELETE = 3
  8375. Const MH_CLEANUP = 4
  8376.  
  8377. Type MONERRSTRUCT
  8378.         cb As Long
  8379.         wLastError As Long
  8380.         dwTime As Long
  8381.         htask As Long
  8382. End Type
  8383.  
  8384. Type MONLINKSTRUCT
  8385.         cb As Long
  8386.         dwTime As Long
  8387.         htask As Long
  8388.         fEstablished As Long
  8389.         fNoData As Long
  8390.         hszSvc As Long
  8391.         hszTopic As Long
  8392.         hszItem As Long
  8393.         wFmt As Long
  8394.         fServer As Long
  8395.         hConvServer As Long
  8396.         hConvClient As Long
  8397. End Type
  8398.  
  8399. Type MONCONVSTRUCT
  8400.         cb As Long
  8401.         fConnect As Long
  8402.         dwTime As Long
  8403.         htask As Long
  8404.         hszSvc As Long
  8405.         hszTopic As Long
  8406.         hConvClient As Long        '  Globally unique value != apps local hConv
  8407.         hConvServer As Long        '  Globally unique value != apps local hConv
  8408. End Type
  8409.  
  8410. Const MAX_MONITORS = 4
  8411. Const APPCLASS_MONITOR = &H1&
  8412. Const XTYP_MONITOR = (&HF0 Or XCLASS_NOTIFICATION Or XTYPF_NOBLOCK)
  8413.  
  8414. ' Callback filter flags for use with MONITOR apps - 0 implies no monitor callbacks
  8415. Const MF_HSZ_INFO = &H1000000
  8416. Const MF_SENDMSGS = &H2000000
  8417. Const MF_POSTMSGS = &H4000000
  8418. Const MF_CALLBACKS = &H8000000
  8419. Const MF_ERRORS = &H10000000
  8420. Const MF_LINKS = &H20000000
  8421. Const MF_CONV = &H40000000
  8422.  
  8423. Const MF_MASK = &HFF000000
  8424.  
  8425. ' -----------------------------------------
  8426. ' Win32 API error code definitions
  8427. ' -----------------------------------------
  8428. ' This section contains the error code definitions for the Win32 API functions.
  8429.  
  8430. ' NO_ERROR
  8431. Const NO_ERROR = 0 '  dderror
  8432.  
  8433. ' The configuration registry database operation completed successfully.
  8434. Const ERROR_SUCCESS = 0&
  8435.  
  8436. '   Incorrect function.
  8437. Const ERROR_INVALID_FUNCTION = 1 '  dderror
  8438.  
  8439. '   The system cannot find the file specified.
  8440. Const ERROR_FILE_NOT_FOUND = 2&
  8441.  
  8442. '   The system cannot find the path specified.
  8443. Const ERROR_PATH_NOT_FOUND = 3&
  8444.  
  8445. '   The system cannot open the file.
  8446. Const ERROR_TOO_MANY_OPEN_FILES = 4&
  8447.  
  8448. '   Access is denied.
  8449. Const ERROR_ACCESS_DENIED = 5&
  8450.  
  8451. '   The handle is invalid.
  8452. Const ERROR_INVALID_HANDLE = 6&
  8453.  
  8454. '   The storage control blocks were destroyed.
  8455. Const ERROR_ARENA_TRASHED = 7&
  8456.  
  8457. '   Not enough storage is available to process this command.
  8458. Const ERROR_NOT_ENOUGH_MEMORY = 8 '  dderror
  8459.  
  8460. '   The storage control block address is invalid.
  8461. Const ERROR_INVALID_BLOCK = 9&
  8462.  
  8463. '   The environment is incorrect.
  8464. Const ERROR_BAD_ENVIRONMENT = 10&
  8465.  
  8466. '   An attempt was made to load a program with an
  8467. '   incorrect format.
  8468. Const ERROR_BAD_FORMAT = 11&
  8469.  
  8470. '   The access code is invalid.
  8471. Const ERROR_INVALID_ACCESS = 12&
  8472.  
  8473. '   The data is invalid.
  8474. Const ERROR_INVALID_DATA = 13&
  8475.  
  8476. '   Not enough storage is available to complete this operation.
  8477. Const ERROR_OUTOFMEMORY = 14&
  8478.  
  8479. '   The system cannot find the drive specified.
  8480. Const ERROR_INVALID_DRIVE = 15&
  8481.  
  8482. '   The directory cannot be removed.
  8483. Const ERROR_CURRENT_DIRECTORY = 16&
  8484.  
  8485. '   The system cannot move the file
  8486. '   to a different disk drive.
  8487. Const ERROR_NOT_SAME_DEVICE = 17&
  8488.  
  8489. '   There are no more files.
  8490. Const ERROR_NO_MORE_FILES = 18&
  8491.  
  8492. '   The media is write protected.
  8493. Const ERROR_WRITE_PROTECT = 19&
  8494.  
  8495. '   The system cannot find the device specified.
  8496. Const ERROR_BAD_UNIT = 20&
  8497.  
  8498. '   The device is not ready.
  8499. Const ERROR_NOT_READY = 21&
  8500.  
  8501. '   The device does not recognize the command.
  8502. Const ERROR_BAD_COMMAND = 22&
  8503.  
  8504. '   Data error (cyclic redundancy check)
  8505. Const ERROR_CRC = 23&
  8506.  
  8507. '   The program issued a command but the
  8508. '   command length is incorrect.
  8509. Const ERROR_BAD_LENGTH = 24&
  8510.  
  8511. '   The drive cannot locate a specific
  8512. '   area or track on the disk.
  8513. Const ERROR_SEEK = 25&
  8514.  
  8515. '   The specified disk or diskette cannot be accessed.
  8516. Const ERROR_NOT_DOS_DISK = 26&
  8517.  
  8518. '   The drive cannot find the sector requested.
  8519. Const ERROR_SECTOR_NOT_FOUND = 27&
  8520.  
  8521. '   The printer is out of paper.
  8522. Const ERROR_OUT_OF_PAPER = 28&
  8523.  
  8524. '   The system cannot write to the specified device.
  8525. Const ERROR_WRITE_FAULT = 29&
  8526.  
  8527. '   The system cannot read from the specified device.
  8528. Const ERROR_READ_FAULT = 30&
  8529.  
  8530. '   A device attached to the system is not functioning.
  8531. Const ERROR_GEN_FAILURE = 31&
  8532.  
  8533. '   The process cannot access the file because
  8534. '   it is being used by another process.
  8535. Const ERROR_SHARING_VIOLATION = 32&
  8536.  
  8537. '   The process cannot access the file because
  8538. '   another process has locked a portion of the file.
  8539. Const ERROR_LOCK_VIOLATION = 33&
  8540.  
  8541. '   The wrong diskette is in the drive.
  8542. '   Insert %2 (Volume Serial Number: %3)
  8543. '   into drive %1.
  8544. Const ERROR_WRONG_DISK = 34&
  8545.  
  8546. '   Too many files opened for sharing.
  8547. Const ERROR_SHARING_BUFFER_EXCEEDED = 36&
  8548.  
  8549. '   Reached end of file.
  8550. Const ERROR_HANDLE_EOF = 38&
  8551.  
  8552. '   The disk is full.
  8553. Const ERROR_HANDLE_DISK_FULL = 39&
  8554.  
  8555. '   The network request is not supported.
  8556. Const ERROR_NOT_SUPPORTED = 50&
  8557.  
  8558. '   The remote computer is not available.
  8559. Const ERROR_REM_NOT_LIST = 51&
  8560.  
  8561. '   A duplicate name exists on the network.
  8562. Const ERROR_DUP_NAME = 52&
  8563.  
  8564. '   The network path was not found.
  8565. Const ERROR_BAD_NETPATH = 53&
  8566.  
  8567. '   The network is busy.
  8568. Const ERROR_NETWORK_BUSY = 54&
  8569.  
  8570. '   The specified network resource or device is no longer
  8571. '   available.
  8572. Const ERROR_DEV_NOT_EXIST = 55 '  dderror
  8573.  
  8574. '   The network BIOS command limit has been reached.
  8575. Const ERROR_TOO_MANY_CMDS = 56&
  8576.  
  8577. '   A network adapter hardware error occurred.
  8578. Const ERROR_ADAP_HDW_ERR = 57&
  8579.  
  8580. '   The specified server cannot perform the requested
  8581. '   operation.
  8582. Const ERROR_BAD_NET_RESP = 58&
  8583.  
  8584. '   An unexpected network error occurred.
  8585. Const ERROR_UNEXP_NET_ERR = 59&
  8586.  
  8587. '   The remote adapter is not compatible.
  8588. Const ERROR_BAD_REM_ADAP = 60&
  8589.  
  8590. '   The printer queue is full.
  8591. Const ERROR_PRINTQ_FULL = 61&
  8592.  
  8593. '   Space to store the file waiting to be printed is
  8594. '   not available on the server.
  8595. Const ERROR_NO_SPOOL_SPACE = 62&
  8596.  
  8597. '   Your file waiting to be printed was deleted.
  8598. Const ERROR_PRINT_CANCELLED = 63&
  8599.  
  8600. '   The specified network name is no longer available.
  8601. Const ERROR_NETNAME_DELETED = 64&
  8602.  
  8603. '   Network access is denied.
  8604. Const ERROR_NETWORK_ACCESS_DENIED = 65&
  8605.  
  8606. '   The network resource type is not correct.
  8607. Const ERROR_BAD_DEV_TYPE = 66&
  8608.  
  8609. '   The network name cannot be found.
  8610. Const ERROR_BAD_NET_NAME = 67&
  8611.  
  8612. '   The name limit for the local computer network
  8613. '   adapter card was exceeded.
  8614. Const ERROR_TOO_MANY_NAMES = 68&
  8615.  
  8616. '   The network BIOS session limit was exceeded.
  8617. Const ERROR_TOO_MANY_SESS = 69&
  8618.  
  8619. '   The remote server has been paused or is in the
  8620. '   process of being started.
  8621. Const ERROR_SHARING_PAUSED = 70&
  8622.  
  8623. '   The network request was not accepted.
  8624. Const ERROR_REQ_NOT_ACCEP = 71&
  8625.  
  8626. '   The specified printer or disk device has been paused.
  8627. Const ERROR_REDIR_PAUSED = 72&
  8628.  
  8629. '   The file exists.
  8630. Const ERROR_FILE_EXISTS = 80&
  8631.  
  8632. '   The directory or file cannot be created.
  8633. Const ERROR_CANNOT_MAKE = 82&
  8634.  
  8635. '   Fail on INT 24
  8636. Const ERROR_FAIL_I24 = 83&
  8637.  
  8638. '   Storage to process this request is not available.
  8639. Const ERROR_OUT_OF_STRUCTURES = 84&
  8640.  
  8641. '   The local device name is already in use.
  8642. Const ERROR_ALREADY_ASSIGNED = 85&
  8643.  
  8644. '   The specified network password is not correct.
  8645. Const ERROR_INVALID_PASSWORD = 86&
  8646.  
  8647. '   The parameter is incorrect.
  8648. Const ERROR_INVALID_PARAMETER = 87 '  dderror
  8649.  
  8650. '   A write fault occurred on the network.
  8651. Const ERROR_NET_WRITE_FAULT = 88&
  8652.  
  8653. '   The system cannot start another process at
  8654. '   this time.
  8655. Const ERROR_NO_PROC_SLOTS = 89&
  8656.  
  8657. '   Cannot create another system semaphore.
  8658. Const ERROR_TOO_MANY_SEMAPHORES = 100&
  8659.  
  8660. '   The exclusive semaphore is owned by another process.
  8661. Const ERROR_EXCL_SEM_ALREADY_OWNED = 101&
  8662.  
  8663. '   The semaphore is set and cannot be closed.
  8664. Const ERROR_SEM_IS_SET = 102&
  8665.  
  8666. '   The semaphore cannot be set again.
  8667. Const ERROR_TOO_MANY_SEM_REQUESTS = 103&
  8668.  
  8669. '   Cannot request exclusive semaphores at interrupt time.
  8670. Const ERROR_INVALID_AT_INTERRUPT_TIME = 104&
  8671.  
  8672. '   The previous ownership of this semaphore has ended.
  8673. Const ERROR_SEM_OWNER_DIED = 105&
  8674.  
  8675. '   Insert the diskette for drive %1.
  8676. Const ERROR_SEM_USER_LIMIT = 106&
  8677.  
  8678. '   Program stopped because alternate diskette was not inserted.
  8679. Const ERROR_DISK_CHANGE = 107&
  8680.  
  8681. '   The disk is in use or locked by
  8682. '   another process.
  8683. Const ERROR_DRIVE_LOCKED = 108&
  8684.  
  8685. '   The pipe has been ended.
  8686. Const ERROR_BROKEN_PIPE = 109&
  8687.  
  8688. '   The system cannot open the
  8689. '   device or file specified.
  8690. Const ERROR_OPEN_FAILED = 110&
  8691.  
  8692. '   The file name is too long.
  8693. Const ERROR_BUFFER_OVERFLOW = 111&
  8694.  
  8695. '   There is not enough space on the disk.
  8696. Const ERROR_DISK_FULL = 112&
  8697.  
  8698. '   No more internal file identifiers available.
  8699. Const ERROR_NO_MORE_SEARCH_HANDLES = 113&
  8700.  
  8701. '   The target internal file identifier is incorrect.
  8702. Const ERROR_INVALID_TARGET_HANDLE = 114&
  8703.  
  8704. '   The IOCTL call made by the application program is
  8705. '   not correct.
  8706. Const ERROR_INVALID_CATEGORY = 117&
  8707.  
  8708. '   The verify-on-write switch parameter value is not
  8709. '   correct.
  8710. Const ERROR_INVALID_VERIFY_SWITCH = 118&
  8711.  
  8712. '   The system does not support the command requested.
  8713. Const ERROR_BAD_DRIVER_LEVEL = 119&
  8714.  
  8715. '   This function is only valid in Windows NT mode.
  8716. Const ERROR_CALL_NOT_IMPLEMENTED = 120&
  8717.  
  8718. '   The semaphore timeout period has expired.
  8719. Const ERROR_SEM_TIMEOUT = 121&
  8720.  
  8721. '   The data area passed to a system call is too
  8722. '   small.
  8723. Const ERROR_INSUFFICIENT_BUFFER = 122 '  dderror
  8724.  
  8725. '   The filename, directory name, or volume label syntax is incorrect.
  8726. Const ERROR_INVALID_NAME = 123&
  8727.  
  8728. '   The system call level is not correct.
  8729. Const ERROR_INVALID_LEVEL = 124&
  8730.  
  8731. '   The disk has no volume label.
  8732. Const ERROR_NO_VOLUME_LABEL = 125&
  8733.  
  8734. '   The specified module could not be found.
  8735. Const ERROR_MOD_NOT_FOUND = 126&
  8736.  
  8737. '   The specified procedure could not be found.
  8738. Const ERROR_PROC_NOT_FOUND = 127&
  8739.  
  8740. '   There are no child processes to wait for.
  8741. Const ERROR_WAIT_NO_CHILDREN = 128&
  8742.  
  8743. '   The %1 application cannot be run in Windows NT mode.
  8744. Const ERROR_CHILD_NOT_COMPLETE = 129&
  8745.  
  8746. '   Attempt to use a file handle to an open disk partition for an
  8747. '   operation other than raw disk I/O.
  8748. Const ERROR_DIRECT_ACCESS_HANDLE = 130&
  8749.  
  8750. '   An attempt was made to move the file pointer before the beginning of the file.
  8751. Const ERROR_NEGATIVE_SEEK = 131&
  8752.  
  8753. '   The file pointer cannot be set on the specified device or file.
  8754. Const ERROR_SEEK_ON_DEVICE = 132&
  8755.  
  8756. '   A JOIN or SUBST command
  8757. '   cannot be used for a drive that
  8758. '   contains previously joined drives.
  8759. Const ERROR_IS_JOIN_TARGET = 133&
  8760.  
  8761. '   An attempt was made to use a
  8762. '   JOIN or SUBST command on a drive that has
  8763. '   already been joined.
  8764. Const ERROR_IS_JOINED = 134&
  8765.  
  8766. '   An attempt was made to use a
  8767. '   JOIN or SUBST command on a drive that has
  8768. '   already been substituted.
  8769. Const ERROR_IS_SUBSTED = 135&
  8770.  
  8771. '   The system tried to delete
  8772. '   the JOIN of a drive that is not joined.
  8773. Const ERROR_NOT_JOINED = 136&
  8774.  
  8775. '   The system tried to delete the
  8776. '   substitution of a drive that is not substituted.
  8777. Const ERROR_NOT_SUBSTED = 137&
  8778.  
  8779. '   The system tried to join a drive
  8780. '   to a directory on a joined drive.
  8781. Const ERROR_JOIN_TO_JOIN = 138&
  8782.  
  8783. '   The system tried to substitute a
  8784. '   drive to a directory on a substituted drive.
  8785. Const ERROR_SUBST_TO_SUBST = 139&
  8786.  
  8787. '   The system tried to join a drive to
  8788. '   a directory on a substituted drive.
  8789. Const ERROR_JOIN_TO_SUBST = 140&
  8790.  
  8791. '   The system tried to SUBST a drive
  8792. '   to a directory on a joined drive.
  8793. Const ERROR_SUBST_TO_JOIN = 141&
  8794.  
  8795. '   The system cannot perform a JOIN or SUBST at this time.
  8796. Const ERROR_BUSY_DRIVE = 142&
  8797.  
  8798. '   The system cannot join or substitute a
  8799. '   drive to or for a directory on the same drive.
  8800. Const ERROR_SAME_DRIVE = 143&
  8801.  
  8802. '   The directory is not a subdirectory of the root directory.
  8803. Const ERROR_DIR_NOT_ROOT = 144&
  8804.  
  8805. '   The directory is not empty.
  8806. Const ERROR_DIR_NOT_EMPTY = 145&
  8807.  
  8808. '   The path specified is being used in
  8809. '   a substitute.
  8810. Const ERROR_IS_SUBST_PATH = 146&
  8811.  
  8812. '   Not enough resources are available to
  8813. '   process this command.
  8814. Const ERROR_IS_JOIN_PATH = 147&
  8815.  
  8816. '   The path specified cannot be used at this time.
  8817. Const ERROR_PATH_BUSY = 148&
  8818.  
  8819. '   An attempt was made to join
  8820. '   or substitute a drive for which a directory
  8821. '   on the drive is the target of a previous
  8822. '   substitute.
  8823. Const ERROR_IS_SUBST_TARGET = 149&
  8824.  
  8825. '   System trace information was not specified in your
  8826. '   CONFIG.SYS file, or tracing is disallowed.
  8827. Const ERROR_SYSTEM_TRACE = 150&
  8828.  
  8829. '   The number of specified semaphore events for
  8830. '   DosMuxSemWait is not correct.
  8831. Const ERROR_INVALID_EVENT_COUNT = 151&
  8832.  
  8833. '   DosMuxSemWait did not execute; too many semaphores
  8834. '   are already set.
  8835. Const ERROR_TOO_MANY_MUXWAITERS = 152&
  8836.  
  8837. '   The DosMuxSemWait list is not correct.
  8838. Const ERROR_INVALID_LIST_FORMAT = 153&
  8839.  
  8840. '   The volume label you entered exceeds the
  8841. '   11 character limit.  The first 11 characters were written
  8842. '   to disk.  Any characters that exceeded the 11 character limit
  8843. '   were automatically deleted.
  8844. Const ERROR_LABEL_TOO_LONG = 154&
  8845.  
  8846. '   Cannot create another thread.
  8847. Const ERROR_TOO_MANY_TCBS = 155&
  8848.  
  8849. '   The recipient process has refused the signal.
  8850. Const ERROR_SIGNAL_REFUSED = 156&
  8851.  
  8852. '   The segment is already discarded and cannot be locked.
  8853. Const ERROR_DISCARDED = 157&
  8854.  
  8855. '   The segment is already unlocked.
  8856. Const ERROR_NOT_LOCKED = 158&
  8857.  
  8858. '   The address for the thread ID is not correct.
  8859. Const ERROR_BAD_THREADID_ADDR = 159&
  8860.  
  8861. '   The argument string passed to DosExecPgm is not correct.
  8862. Const ERROR_BAD_ARGUMENTS = 160&
  8863.  
  8864. '   The specified path is invalid.
  8865. Const ERROR_BAD_PATHNAME = 161&
  8866.  
  8867. '   A signal is already pending.
  8868. Const ERROR_SIGNAL_PENDING = 162&
  8869.  
  8870. '   No more threads can be created in the system.
  8871. Const ERROR_MAX_THRDS_REACHED = 164&
  8872.  
  8873. '   Unable to lock a region of a file.
  8874. Const ERROR_LOCK_FAILED = 167&
  8875.  
  8876. '   The requested resource is in use.
  8877. Const ERROR_BUSY = 170&
  8878.  
  8879. '   A lock request was not outstanding for the supplied cancel region.
  8880. Const ERROR_CANCEL_VIOLATION = 173&
  8881.  
  8882. '   The file system does not support atomic changes to the lock type.
  8883. Const ERROR_ATOMIC_LOCKS_NOT_SUPPORTED = 174&
  8884.  
  8885. '   The system detected a segment number that was not correct.
  8886. Const ERROR_INVALID_SEGMENT_NUMBER = 180&
  8887.  
  8888. '   The operating system cannot run %1.
  8889. Const ERROR_INVALID_ORDINAL = 182&
  8890.  
  8891. '   Cannot create a file when that file already exists.
  8892. Const ERROR_ALREADY_EXISTS = 183&
  8893.  
  8894. '   The flag passed is not correct.
  8895. Const ERROR_INVALID_FLAG_NUMBER = 186&
  8896.  
  8897. '   The specified system semaphore name was not found.
  8898. Const ERROR_SEM_NOT_FOUND = 187&
  8899.  
  8900. '   The operating system cannot run %1.
  8901. Const ERROR_INVALID_STARTING_CODESEG = 188&
  8902.  
  8903. '   The operating system cannot run %1.
  8904. Const ERROR_INVALID_STACKSEG = 189&
  8905.  
  8906. '   The operating system cannot run %1.
  8907. Const ERROR_INVALID_MODULETYPE = 190&
  8908.  
  8909. '   Cannot run %1 in Windows NT mode.
  8910. Const ERROR_INVALID_EXE_SIGNATURE = 191&
  8911.  
  8912. '   The operating system cannot run %1.
  8913. Const ERROR_EXE_MARKED_INVALID = 192&
  8914.  
  8915. '   %1 is not a valid Windows NT application.
  8916. Const ERROR_BAD_EXE_FORMAT = 193&
  8917.  
  8918. '   The operating system cannot run %1.
  8919. Const ERROR_ITERATED_DATA_EXCEEDS_64k = 194&
  8920.  
  8921. '   The operating system cannot run %1.
  8922. Const ERROR_INVALID_MINALLOCSIZE = 195&
  8923.  
  8924. '   The operating system cannot run this
  8925. '   application program.
  8926. Const ERROR_DYNLINK_FROM_INVALID_RING = 196&
  8927.  
  8928. '   The operating system is not presently
  8929. '   configured to run this application.
  8930. Const ERROR_IOPL_NOT_ENABLED = 197&
  8931.  
  8932. '   The operating system cannot run %1.
  8933. Const ERROR_INVALID_SEGDPL = 198&
  8934.  
  8935. '   The operating system cannot run this
  8936. '   application program.
  8937. Const ERROR_AUTODATASEG_EXCEEDS_64k = 199&
  8938.  
  8939. '   The code segment cannot be greater than or equal to 64KB.
  8940. Const ERROR_RING2SEG_MUST_BE_MOVABLE = 200&
  8941.  
  8942. '   The operating system cannot run %1.
  8943. Const ERROR_RELOC_CHAIN_XEEDS_SEGLIM = 201&
  8944.  
  8945. '   The operating system cannot run %1.
  8946. Const ERROR_INFLOOP_IN_RELOC_CHAIN = 202&
  8947.  
  8948. '   The system could not find the environment
  8949. '   option that was entered.
  8950. Const ERROR_ENVVAR_NOT_FOUND = 203&
  8951.  
  8952. '   No process in the command subtree has a
  8953. '   signal handler.
  8954. Const ERROR_NO_SIGNAL_SENT = 205&
  8955.  
  8956. '   The filename or extension is too long.
  8957. Const ERROR_FILENAME_EXCED_RANGE = 206&
  8958.  
  8959. '   The ring 2 stack is in use.
  8960. Const ERROR_RING2_STACK_IN_USE = 207&
  8961.  
  8962. '   The Global filename characters,  or ?, are entered
  8963. '   incorrectly or too many Global filename characters are specified.
  8964. Const ERROR_META_EXPANSION_TOO_LONG = 208&
  8965.  
  8966. '   The signal being posted is not correct.
  8967. Const ERROR_INVALID_SIGNAL_NUMBER = 209&
  8968.  
  8969. '   The signal handler cannot be set.
  8970. Const ERROR_THREAD_1_INACTIVE = 210&
  8971.  
  8972. '   The segment is locked and cannot be reallocated.
  8973. Const ERROR_LOCKED = 212&
  8974.  
  8975. '   Too many dynamic link modules are attached to this
  8976. '   program or dynamic link module.
  8977. Const ERROR_TOO_MANY_MODULES = 214&
  8978.  
  8979. '   Can't nest calls to LoadModule.
  8980. Const ERROR_NESTING_NOT_ALLOWED = 215&
  8981.  
  8982. '   The pipe state is invalid.
  8983. Const ERROR_BAD_PIPE = 230&
  8984.  
  8985. '   All pipe instances are busy.
  8986. Const ERROR_PIPE_BUSY = 231&
  8987.  
  8988. '   The pipe is being closed.
  8989. Const ERROR_NO_DATA = 232&
  8990.  
  8991. '   No process is on the other end of the pipe.
  8992. Const ERROR_PIPE_NOT_CONNECTED = 233&
  8993.  
  8994. '   More data is available.
  8995. Const ERROR_MORE_DATA = 234 '  dderror
  8996.  
  8997. '   The session was cancelled.
  8998. Const ERROR_VC_DISCONNECTED = 240&
  8999.  
  9000. '   The specified extended attribute name was invalid.
  9001. Const ERROR_INVALID_EA_NAME = 254&
  9002.  
  9003. '   The extended attributes are inconsistent.
  9004. Const ERROR_EA_LIST_INCONSISTENT = 255&
  9005.  
  9006. '   No more data is available.
  9007. Const ERROR_NO_MORE_ITEMS = 259&
  9008.  
  9009. '   The Copy API cannot be used.
  9010. Const ERROR_CANNOT_COPY = 266&
  9011.  
  9012. '   The directory name is invalid.
  9013. Const ERROR_DIRECTORY = 267&
  9014.  
  9015. '   The extended attributes did not fit in the buffer.
  9016. Const ERROR_EAS_DIDNT_FIT = 275&
  9017.  
  9018. '   The extended attribute file on the mounted file system is corrupt.
  9019. Const ERROR_EA_FILE_CORRUPT = 276&
  9020.  
  9021. '   The extended attribute table file is full.
  9022. Const ERROR_EA_TABLE_FULL = 277&
  9023.  
  9024. '   The specified extended attribute handle is invalid.
  9025. Const ERROR_INVALID_EA_HANDLE = 278&
  9026.  
  9027. '   The mounted file system does not support extended attributes.
  9028. Const ERROR_EAS_NOT_SUPPORTED = 282&
  9029.  
  9030. '   Attempt to release mutex not owned by caller.
  9031. Const ERROR_NOT_OWNER = 288&
  9032.  
  9033. '   Too many posts were made to a semaphore.
  9034. Const ERROR_TOO_MANY_POSTS = 298&
  9035.  
  9036. '   The system cannot find message for message number 0x%1
  9037. '   in message file for %2.
  9038. Const ERROR_MR_MID_NOT_FOUND = 317&
  9039.  
  9040. '   Attempt to access invalid address.
  9041. Const ERROR_INVALID_ADDRESS = 487&
  9042.  
  9043. '   Arithmetic result exceeded 32 bits.
  9044. Const ERROR_ARITHMETIC_OVERFLOW = 534&
  9045.  
  9046. '   There is a process on other end of the pipe.
  9047. Const ERROR_PIPE_CONNECTED = 535&
  9048.  
  9049. '   Waiting for a process to open the other end of the pipe.
  9050. Const ERROR_PIPE_LISTENING = 536&
  9051.  
  9052. '   Access to the extended attribute was denied.
  9053. Const ERROR_EA_ACCESS_DENIED = 994&
  9054.  
  9055. '   The I/O operation has been aborted because of either a thread exit
  9056. '   or an application request.
  9057. Const ERROR_OPERATION_ABORTED = 995&
  9058.  
  9059. '   Overlapped I/O event is not in a signalled state.
  9060. Const ERROR_IO_INCOMPLETE = 996&
  9061.  
  9062. '   Overlapped I/O operation is in progress.
  9063. Const ERROR_IO_PENDING = 997 '  dderror
  9064.  
  9065. '   Invalid access to memory location.
  9066. Const ERROR_NOACCESS = 998&
  9067.  
  9068. '   Error performing inpage operation.
  9069. Const ERROR_SWAPERROR = 999&
  9070.  
  9071. '   Recursion too deep, stack overflowed.
  9072. Const ERROR_STACK_OVERFLOW = 1001&
  9073.  
  9074. '   The window cannot act on the sent message.
  9075. Const ERROR_INVALID_MESSAGE = 1002&
  9076.  
  9077. '   Cannot complete this function.
  9078. Const ERROR_CAN_NOT_COMPLETE = 1003&
  9079.  
  9080. '   Invalid flags.
  9081. Const ERROR_INVALID_FLAGS = 1004&
  9082.  
  9083. '   The volume does not contain a recognized file system.
  9084. '   Please make sure that all required file system drivers are loaded and that the
  9085. '   volume is not corrupt.
  9086. Const ERROR_UNRECOGNIZED_VOLUME = 1005&
  9087.  
  9088. '   The volume for a file has been externally altered such that the
  9089. '   opened file is no longer valid.
  9090. Const ERROR_FILE_INVALID = 1006&
  9091.  
  9092. '   The requested operation cannot be performed in full-screen mode.
  9093. Const ERROR_FULLSCREEN_MODE = 1007&
  9094.  
  9095. '   An attempt was made to reference a token that does not exist.
  9096. Const ERROR_NO_TOKEN = 1008&
  9097.  
  9098. '   The configuration registry database is corrupt.
  9099. Const ERROR_BADDB = 1009&
  9100.  
  9101. '   The configuration registry key is invalid.
  9102. Const ERROR_BADKEY = 1010&
  9103.  
  9104. '   The configuration registry key could not be opened.
  9105. Const ERROR_CANTOPEN = 1011&
  9106.  
  9107. '   The configuration registry key could not be read.
  9108. Const ERROR_CANTREAD = 1012&
  9109.  
  9110. '   The configuration registry key could not be written.
  9111. Const ERROR_CANTWRITE = 1013&
  9112.  
  9113. '   One of the files in the Registry database had to be recovered
  9114. '   by use of a log or alternate copy.  The recovery was successful.
  9115. Const ERROR_REGISTRY_RECOVERED = 1014&
  9116.  
  9117. '   The Registry is corrupt. The structure of one of the files that contains
  9118. '   Registry data is corrupt, or the system's image of the file in memory
  9119. '   is corrupt, or the file could not be recovered because the alternate
  9120. '   copy or log was absent or corrupt.
  9121. Const ERROR_REGISTRY_CORRUPT = 1015&
  9122.  
  9123. '   An I/O operation initiated by the Registry failed unrecoverably.
  9124. '   The Registry could not read in, or write out, or flush, one of the files
  9125. '   that contain the system's image of the Registry.
  9126. Const ERROR_REGISTRY_IO_FAILED = 1016&
  9127.  
  9128. '   The system has attempted to load or restore a file into the Registry, but the
  9129. '   specified file is not in a Registry file format.
  9130. Const ERROR_NOT_REGISTRY_FILE = 1017&
  9131.  
  9132. '   Illegal operation attempted on a Registry key which has been marked for deletion.
  9133. Const ERROR_KEY_DELETED = 1018&
  9134.  
  9135. '   System could not allocate the required space in a Registry log.
  9136. Const ERROR_NO_LOG_SPACE = 1019&
  9137.  
  9138. '   Cannot create a symbolic link in a Registry key that already
  9139. '   has subkeys or values.
  9140. Const ERROR_KEY_HAS_CHILDREN = 1020&
  9141.  
  9142. '   Cannot create a stable subkey under a volatile parent key.
  9143. Const ERROR_CHILD_MUST_BE_VOLATILE = 1021&
  9144.  
  9145. '   A notify change request is being completed and the information
  9146. '   is not being returned in the caller's buffer. The caller now
  9147. '   needs to enumerate the files to find the changes.
  9148. Const ERROR_NOTIFY_ENUM_DIR = 1022&
  9149.  
  9150. '   A stop control has been sent to a service which other running services
  9151. '   are dependent on.
  9152. Const ERROR_DEPENDENT_SERVICES_RUNNING = 1051&
  9153.  
  9154. '   The requested control is not valid for this service
  9155. Const ERROR_INVALID_SERVICE_CONTROL = 1052&
  9156.  
  9157. '   The service did not respond to the start or control request in a timely
  9158. '   fashion.
  9159. Const ERROR_SERVICE_REQUEST_TIMEOUT = 1053&
  9160.  
  9161. '   A thread could not be created for the service.
  9162. Const ERROR_SERVICE_NO_THREAD = 1054&
  9163.  
  9164. '   The service database is locked.
  9165. Const ERROR_SERVICE_DATABASE_LOCKED = 1055&
  9166.  
  9167. '   An instance of the service is already running.
  9168. Const ERROR_SERVICE_ALREADY_RUNNING = 1056&
  9169.  
  9170. '   The account name is invalid or does not exist.
  9171. Const ERROR_INVALID_SERVICE_ACCOUNT = 1057&
  9172.  
  9173. '   The specified service is disabled and cannot be started.
  9174. Const ERROR_SERVICE_DISABLED = 1058&
  9175.  
  9176. '   Circular service dependency was specified.
  9177. Const ERROR_CIRCULAR_DEPENDENCY = 1059&
  9178.  
  9179. '   The specified service does not exist as an installed service.
  9180. Const ERROR_SERVICE_DOES_NOT_EXIST = 1060&
  9181.  
  9182. '   The service cannot accept control messages at this time.
  9183. Const ERROR_SERVICE_CANNOT_ACCEPT_CTRL = 1061&
  9184.  
  9185. '   The service has not been started.
  9186. Const ERROR_SERVICE_NOT_ACTIVE = 1062&
  9187.  
  9188. '   The service process could not connect to the service controller.
  9189. Const ERROR_FAILED_SERVICE_CONTROLLER_CONNECT = 1063&
  9190.  
  9191. '   An exception occurred in the service when handling the control request.
  9192. Const ERROR_EXCEPTION_IN_SERVICE = 1064&
  9193.  
  9194. '   The database specified does not exist.
  9195. Const ERROR_DATABASE_DOES_NOT_EXIST = 1065&
  9196.  
  9197. '   The service has returned a service-specific error code.
  9198. Const ERROR_SERVICE_SPECIFIC_ERROR = 1066&
  9199.  
  9200. '   The process terminated unexpectedly.
  9201. Const ERROR_PROCESS_ABORTED = 1067&
  9202.  
  9203. '   The dependency service or group failed to start.
  9204. Const ERROR_SERVICE_DEPENDENCY_FAIL = 1068&
  9205.  
  9206. '   The service did not start due to a logon failure.
  9207. Const ERROR_SERVICE_LOGON_FAILED = 1069&
  9208.  
  9209. '   After starting, the service hung in a start-pending state.
  9210. Const ERROR_SERVICE_START_HANG = 1070&
  9211.  
  9212. '   The specified service database lock is invalid.
  9213. Const ERROR_INVALID_SERVICE_LOCK = 1071&
  9214.  
  9215. '   The specified service has been marked for deletion.
  9216. Const ERROR_SERVICE_MARKED_FOR_DELETE = 1072&
  9217.  
  9218. '   The specified service already exists.
  9219. Const ERROR_SERVICE_EXISTS = 1073&
  9220.  
  9221. '   The system is currently running with the last-known-good configuration.
  9222. Const ERROR_ALREADY_RUNNING_LKG = 1074&
  9223.  
  9224. '   The dependency service does not exist or has been marked for
  9225. '   deletion.
  9226. Const ERROR_SERVICE_DEPENDENCY_DELETED = 1075&
  9227.  
  9228. '   The current boot has already been accepted for use as the
  9229. '   last-known-good control set.
  9230. Const ERROR_BOOT_ALREADY_ACCEPTED = 1076&
  9231.  
  9232. '   No attempts to start the service have been made since the last boot.
  9233. Const ERROR_SERVICE_NEVER_STARTED = 1077&
  9234.  
  9235. '   The name is already in use as either a service name or a service display
  9236. '   name.
  9237. Const ERROR_DUPLICATE_SERVICE_NAME = 1078&
  9238.  
  9239. '   The physical end of the tape has been reached.
  9240. Const ERROR_END_OF_MEDIA = 1100&
  9241.  
  9242. '   A tape access reached a filemark.
  9243. Const ERROR_FILEMARK_DETECTED = 1101&
  9244.  
  9245. '   Beginning of tape or partition was encountered.
  9246. Const ERROR_BEGINNING_OF_MEDIA = 1102&
  9247.  
  9248. '   A tape access reached the end of a set of files.
  9249. Const ERROR_SETMARK_DETECTED = 1103&
  9250.  
  9251. '   No more data is on the tape.
  9252. Const ERROR_NO_DATA_DETECTED = 1104&
  9253.  
  9254. '   Tape could not be partitioned.
  9255. Const ERROR_PARTITION_FAILURE = 1105&
  9256.  
  9257. '   When accessing a new tape of a multivolume partition, the current
  9258. '   blocksize is incorrect.
  9259. Const ERROR_INVALID_BLOCK_LENGTH = 1106&
  9260.  
  9261. '   Tape partition information could not be found when loading a tape.
  9262. Const ERROR_DEVICE_NOT_PARTITIONED = 1107&
  9263.  
  9264. '   Unable to lock the media eject mechanism.
  9265. Const ERROR_UNABLE_TO_LOCK_MEDIA = 1108&
  9266.  
  9267. '   Unable to unload the media.
  9268. Const ERROR_UNABLE_TO_UNLOAD_MEDIA = 1109&
  9269.  
  9270. '   Media in drive may have changed.
  9271. Const ERROR_MEDIA_CHANGED = 1110&
  9272.  
  9273. '   The I/O bus was reset.
  9274. Const ERROR_BUS_RESET = 1111&
  9275.  
  9276. '   No media in drive.
  9277. Const ERROR_NO_MEDIA_IN_DRIVE = 1112&
  9278.  
  9279. '   No mapping for the Unicode character exists in the target multi-byte code page.
  9280. Const ERROR_NO_UNICODE_TRANSLATION = 1113&
  9281.  
  9282. '   A dynamic link library (DLL) initialization routine failed.
  9283. Const ERROR_DLL_INIT_FAILED = 1114&
  9284.  
  9285. '   A system shutdown is in progress.
  9286. Const ERROR_SHUTDOWN_IN_PROGRESS = 1115&
  9287.  
  9288. '   Unable to abort the system shutdown because no shutdown was in progress.
  9289. Const ERROR_NO_SHUTDOWN_IN_PROGRESS = 1116&
  9290.  
  9291. '   The request could not be performed because of an I/O device error.
  9292. Const ERROR_IO_DEVICE = 1117&
  9293.  
  9294. '   No serial device was successfully initialized.  The serial driver will unload.
  9295. Const ERROR_SERIAL_NO_DEVICE = 1118&
  9296.  
  9297. '   Unable to open a device that was sharing an interrupt request (IRQ)
  9298. '   with other devices. At least one other device that uses that IRQ
  9299. '   was already opened.
  9300. Const ERROR_IRQ_BUSY = 1119&
  9301.  
  9302. '   A serial I/O operation was completed by another write to the serial port.
  9303. '   (The IOCTL_SERIAL_XOFF_COUNTER reached zero.)
  9304. Const ERROR_MORE_WRITES = 1120&
  9305.  
  9306. '   A serial I/O operation completed because the time-out period expired.
  9307. '   (The IOCTL_SERIAL_XOFF_COUNTER did not reach zero.)
  9308. Const ERROR_COUNTER_TIMEOUT = 1121&
  9309.  
  9310. '   No ID address mark was found on the floppy disk.
  9311. Const ERROR_FLOPPY_ID_MARK_NOT_FOUND = 1122&
  9312.  
  9313. '   Mismatch between the floppy disk sector ID field and the floppy disk
  9314. '   controller track address.
  9315. Const ERROR_FLOPPY_WRONG_CYLINDER = 1123&
  9316.  
  9317. '   The floppy disk controller reported an error that is not recognized
  9318. '   by the floppy disk driver.
  9319. Const ERROR_FLOPPY_UNKNOWN_ERROR = 1124&
  9320.  
  9321. '   The floppy disk controller returned inconsistent results in its registers.
  9322. Const ERROR_FLOPPY_BAD_REGISTERS = 1125&
  9323.  
  9324. '   While accessing the hard disk, a recalibrate operation failed, even after retries.
  9325. Const ERROR_DISK_RECALIBRATE_FAILED = 1126&
  9326.  
  9327. '   While accessing the hard disk, a disk operation failed even after retries.
  9328. Const ERROR_DISK_OPERATION_FAILED = 1127&
  9329.  
  9330. '   While accessing the hard disk, a disk controller reset was needed, but
  9331. '   even that failed.
  9332. Const ERROR_DISK_RESET_FAILED = 1128&
  9333.  
  9334. '   Physical end of tape encountered.
  9335. Const ERROR_EOM_OVERFLOW = 1129&
  9336.  
  9337. '   Not enough server storage is available to process this command.
  9338. Const ERROR_NOT_ENOUGH_SERVER_MEMORY = 1130&
  9339.  
  9340. '   A potential deadlock condition has been detected.
  9341. Const ERROR_POSSIBLE_DEADLOCK = 1131&
  9342.  
  9343. '   The base address or the file offset specified does not have the proper
  9344. '   alignment.
  9345. Const ERROR_MAPPED_ALIGNMENT = 1132&
  9346.  
  9347. ' NEW for Win32
  9348. Const ERROR_INVALID_PIXEL_FORMAT = 2000
  9349. Const ERROR_BAD_DRIVER = 2001
  9350. Const ERROR_INVALID_WINDOW_STYLE = 2002
  9351. Const ERROR_METAFILE_NOT_SUPPORTED = 2003
  9352. Const ERROR_TRANSFORM_NOT_SUPPORTED = 2004
  9353. Const ERROR_CLIPPING_NOT_SUPPORTED = 2005
  9354. Const ERROR_UNKNOWN_PRINT_MONITOR = 3000
  9355. Const ERROR_PRINTER_DRIVER_IN_USE = 3001
  9356. Const ERROR_SPOOL_FILE_NOT_FOUND = 3002
  9357. Const ERROR_SPL_NO_STARTDOC = 3003
  9358. Const ERROR_SPL_NO_ADDJOB = 3004
  9359. Const ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED = 3005
  9360. Const ERROR_PRINT_MONITOR_ALREADY_INSTALLED = 3006
  9361. Const ERROR_WINS_INTERNAL = 4000
  9362. Const ERROR_CAN_NOT_DEL_LOCAL_WINS = 4001
  9363. Const ERROR_STATIC_INIT = 4002
  9364. Const ERROR_INC_BACKUP = 4003
  9365. Const ERROR_FULL_BACKUP = 4004
  9366. Const ERROR_REC_NON_EXISTENT = 4005
  9367. Const ERROR_RPL_NOT_ALLOWED = 4006
  9368. Const SEVERITY_SUCCESS = 0
  9369. Const SEVERITY_ERROR = 1
  9370. Const FACILITY_NT_BIT = &H10000000
  9371. Const NOERROR = 0
  9372. Const E_UNEXPECTED = &H8000FFFF
  9373. Const E_NOTIMPL = &H80004001
  9374. Const E_OUTOFMEMORY = &H8007000E
  9375. Const E_INVALIDARG = &H80070057
  9376. Const E_NOINTERFACE = &H80004002
  9377. Const E_POINTER = &H80004003
  9378. Const E_HANDLE = &H80070006
  9379. Const E_ABORT = &H80004004
  9380. Const E_FAIL = &H80004005
  9381. Const E_ACCESSDENIED = &H80070005
  9382. Const CO_E_INIT_TLS = &H80004006
  9383. Const CO_E_INIT_SHARED_ALLOCATOR = &H80004007
  9384. Const CO_E_INIT_MEMORY_ALLOCATOR = &H80004008
  9385. Const CO_E_INIT_CLASS_CACHE = &H80004009
  9386. Const CO_E_INIT_RPC_CHANNEL = &H8000400A
  9387. Const CO_E_INIT_TLS_SET_CHANNEL_CONTROL = &H8000400B
  9388. Const CO_E_INIT_TLS_CHANNEL_CONTROL = &H8000400C
  9389. Const CO_E_INIT_UNACCEPTED_USER_ALLOCATOR = &H8000400D
  9390. Const CO_E_INIT_SCM_MUTEX_EXISTS = &H8000400E
  9391. Const CO_E_INIT_SCM_FILE_MAPPING_EXISTS = &H8000400F
  9392. Const CO_E_INIT_SCM_MAP_VIEW_OF_FILE = &H80004010
  9393. Const CO_E_INIT_SCM_EXEC_FAILURE = &H80004011
  9394. Const CO_E_INIT_ONLY_SINGLE_THREADED = &H80004012
  9395. Const S_OK = &H0
  9396. Const S_FALSE = &H1
  9397. Const OLE_E_FIRST = &H80040000
  9398. Const OLE_E_LAST = &H800400FF
  9399. Const OLE_S_FIRST = &H40000
  9400. Const OLE_S_LAST = &H400FF
  9401. Const OLE_E_OLEVERB = &H80040000
  9402. Const OLE_E_ADVF = &H80040001
  9403. Const OLE_E_ENUM_NOMORE = &H80040002
  9404. Const OLE_E_ADVISENOTSUPPORTED = &H80040003
  9405. Const OLE_E_NOCONNECTION = &H80040004
  9406. Const OLE_E_NOTRUNNING = &H80040005
  9407. Const OLE_E_NOCACHE = &H80040006
  9408. Const OLE_E_BLANK = &H80040007
  9409. Const OLE_E_CLASSDIFF = &H80040008
  9410. Const OLE_E_CANT_GETMONIKER = &H80040009
  9411. Const OLE_E_CANT_BINDTOSOURCE = &H8004000A
  9412. Const OLE_E_STATIC = &H8004000B
  9413. Const OLE_E_PROMPTSAVECANCELLED = &H8004000C
  9414. Const OLE_E_INVALIDRECT = &H8004000D
  9415. Const OLE_E_WRONGCOMPOBJ = &H8004000E
  9416. Const OLE_E_INVALIDHWND = &H8004000F
  9417. Const OLE_E_NOT_INPLACEACTIVE = &H80040010
  9418. Const OLE_E_CANTCONVERT = &H80040011
  9419. Const OLE_E_NOSTORAGE = &H80040012
  9420. Const DV_E_FORMATETC = &H80040064
  9421. Const DV_E_DVTARGETDEVICE = &H80040065
  9422. Const DV_E_STGMEDIUM = &H80040066
  9423. Const DV_E_STATDATA = &H80040067
  9424. Const DV_E_LINDEX = &H80040068
  9425. Const DV_E_TYMED = &H80040069
  9426. Const DV_E_CLIPFORMAT = &H8004006A
  9427. Const DV_E_DVASPECT = &H8004006B
  9428. Const DV_E_DVTARGETDEVICE_SIZE = &H8004006C
  9429. Const DV_E_NOIVIEWOBJECT = &H8004006D
  9430. Const DRAGDROP_E_FIRST = &H80040100
  9431. Const DRAGDROP_E_LAST = &H8004010F
  9432. Const DRAGDROP_S_FIRST = &H40100
  9433. Const DRAGDROP_S_LAST = &H4010F
  9434. Const DRAGDROP_E_NOTREGISTERED = &H80040100
  9435. Const DRAGDROP_E_ALREADYREGISTERED = &H80040101
  9436. Const DRAGDROP_E_INVALIDHWND = &H80040102
  9437. Const CLASSFACTORY_E_FIRST = &H80040110
  9438. Const CLASSFACTORY_E_LAST = &H8004011F
  9439. Const CLASSFACTORY_S_FIRST = &H40110
  9440. Const CLASSFACTORY_S_LAST = &H4011F
  9441. Const CLASS_E_NOAGGREGATION = &H80040110
  9442. Const CLASS_E_CLASSNOTAVAILABLE = &H80040111
  9443. Const MARSHAL_E_FIRST = &H80040120
  9444. Const MARSHAL_E_LAST = &H8004012F
  9445. Const MARSHAL_S_FIRST = &H40120
  9446. Const MARSHAL_S_LAST = &H4012F
  9447. Const DATA_E_FIRST = &H80040130
  9448. Const DATA_E_LAST = &H8004013F
  9449. Const DATA_S_FIRST = &H40130
  9450. Const DATA_S_LAST = &H4013F
  9451. Const VIEW_E_FIRST = &H80040140
  9452. Const VIEW_E_LAST = &H8004014F
  9453. Const VIEW_S_FIRST = &H40140
  9454. Const VIEW_S_LAST = &H4014F
  9455. Const VIEW_E_DRAW = &H80040140
  9456. Const REGDB_E_FIRST = &H80040150
  9457. Const REGDB_E_LAST = &H8004015F
  9458. Const REGDB_S_FIRST = &H40150
  9459. Const REGDB_S_LAST = &H4015F
  9460. Const REGDB_E_READREGDB = &H80040150
  9461. Const REGDB_E_WRITEREGDB = &H80040151
  9462. Const REGDB_E_KEYMISSING = &H80040152
  9463. Const REGDB_E_INVALIDVALUE = &H80040153
  9464. Const REGDB_E_CLASSNOTREG = &H80040154
  9465. Const REGDB_E_IIDNOTREG = &H80040155
  9466. Const CACHE_E_FIRST = &H80040170
  9467. Const CACHE_E_LAST = &H8004017F
  9468. Const CACHE_S_FIRST = &H40170
  9469. Const CACHE_S_LAST = &H4017F
  9470. Const CACHE_E_NOCACHE_UPDATED = &H80040170
  9471. Const OLEOBJ_E_FIRST = &H80040180
  9472. Const OLEOBJ_E_LAST = &H8004018F
  9473. Const OLEOBJ_S_FIRST = &H40180
  9474. Const OLEOBJ_S_LAST = &H4018F
  9475. Const OLEOBJ_E_NOVERBS = &H80040180
  9476. Const OLEOBJ_E_INVALIDVERB = &H80040181
  9477. Const CLIENTSITE_E_FIRST = &H80040190
  9478. Const CLIENTSITE_E_LAST = &H8004019F
  9479. Const CLIENTSITE_S_FIRST = &H40190
  9480. Const CLIENTSITE_S_LAST = &H4019F
  9481. Const INPLACE_E_NOTUNDOABLE = &H800401A0
  9482. Const INPLACE_E_NOTOOLSPACE = &H800401A1
  9483. Const INPLACE_E_FIRST = &H800401A0
  9484. Const INPLACE_E_LAST = &H800401AF
  9485. Const INPLACE_S_FIRST = &H401A0
  9486. Const INPLACE_S_LAST = &H401AF
  9487. Const ENUM_E_FIRST = &H800401B0
  9488. Const ENUM_E_LAST = &H800401BF
  9489. Const ENUM_S_FIRST = &H401B0
  9490. Const ENUM_S_LAST = &H401BF
  9491. Const CONVERT10_E_FIRST = &H800401C0
  9492. Const CONVERT10_E_LAST = &H800401CF
  9493. Const CONVERT10_S_FIRST = &H401C0
  9494. Const CONVERT10_S_LAST = &H401CF
  9495. Const CONVERT10_E_OLESTREAM_GET = &H800401C0
  9496. Const CONVERT10_E_OLESTREAM_PUT = &H800401C1
  9497. Const CONVERT10_E_OLESTREAM_FMT = &H800401C2
  9498. Const CONVERT10_E_OLESTREAM_BITMAP_TO_DIB = &H800401C3
  9499. Const CONVERT10_E_STG_FMT = &H800401C4
  9500. Const CONVERT10_E_STG_NO_STD_STREAM = &H800401C5
  9501. Const CONVERT10_E_STG_DIB_TO_BITMAP = &H800401C6
  9502. Const CLIPBRD_E_FIRST = &H800401D0
  9503. Const CLIPBRD_E_LAST = &H800401DF
  9504. Const CLIPBRD_S_FIRST = &H401D0
  9505. Const CLIPBRD_S_LAST = &H401DF
  9506. Const CLIPBRD_E_CANT_OPEN = &H800401D0
  9507. Const CLIPBRD_E_CANT_EMPTY = &H800401D1
  9508. Const CLIPBRD_E_CANT_SET = &H800401D2
  9509. Const CLIPBRD_E_BAD_DATA = &H800401D3
  9510. Const CLIPBRD_E_CANT_CLOSE = &H800401D4
  9511. Const MK_E_FIRST = &H800401E0
  9512. Const MK_E_LAST = &H800401EF
  9513. Const MK_S_FIRST = &H401E0
  9514. Const MK_S_LAST = &H401EF
  9515. Const MK_E_CONNECTMANUALLY = &H800401E0
  9516. Const MK_E_EXCEEDEDDEADLINE = &H800401E1
  9517. Const MK_E_NEEDGENERIC = &H800401E2
  9518. Const MK_E_UNAVAILABLE = &H800401E3
  9519. Const MK_E_SYNTAX = &H800401E4
  9520. Const MK_E_NOOBJECT = &H800401E5
  9521. Const MK_E_INVALIDEXTENSION = &H800401E6
  9522. Const MK_E_INTERMEDIATEINTERFACENOTSUPPORTED = &H800401E7
  9523. Const MK_E_NOTBINDABLE = &H800401E8
  9524. Const MK_E_NOTBOUND = &H800401E9
  9525. Const MK_E_CANTOPENFILE = &H800401EA
  9526. Const MK_E_MUSTBOTHERUSER = &H800401EB
  9527. Const MK_E_NOINVERSE = &H800401EC
  9528. Const MK_E_NOSTORAGE = &H800401ED
  9529. Const MK_E_NOPREFIX = &H800401EE
  9530. Const MK_E_ENUMERATION_FAILED = &H800401EF
  9531. Const CO_E_FIRST = &H800401F0
  9532. Const CO_E_LAST = &H800401FF
  9533. Const CO_S_FIRST = &H401F0
  9534. Const CO_S_LAST = &H401FF
  9535. Const CO_E_NOTINITIALIZED = &H800401F0
  9536. Const CO_E_ALREADYINITIALIZED = &H800401F1
  9537. Const CO_E_CANTDETERMINECLASS = &H800401F2
  9538. Const CO_E_CLASSSTRING = &H800401F3
  9539. Const CO_E_IIDSTRING = &H800401F4
  9540. Const CO_E_APPNOTFOUND = &H800401F5
  9541. Const CO_E_APPSINGLEUSE = &H800401F6
  9542. Const CO_E_ERRORINAPP = &H800401F7
  9543. Const CO_E_DLLNOTFOUND = &H800401F8
  9544. Const CO_E_ERRORINDLL = &H800401F9
  9545. Const CO_E_WRONGOSFORAPP = &H800401FA
  9546. Const CO_E_OBJNOTREG = &H800401FB
  9547. Const CO_E_OBJISREG = &H800401FC
  9548. Const CO_E_OBJNOTCONNECTED = &H800401FD
  9549. Const CO_E_APPDIDNTREG = &H800401FE
  9550. Const CO_E_RELEASED = &H800401FF
  9551. Const OLE_S_USEREG = &H40000
  9552. Const OLE_S_STATIC = &H40001
  9553. Const OLE_S_MAC_CLIPFORMAT = &H40002
  9554. Const DRAGDROP_S_DROP = &H40100
  9555. Const DRAGDROP_S_CANCEL = &H40101
  9556. Const DRAGDROP_S_USEDEFAULTCURSORS = &H40102
  9557. Const DATA_S_SAMEFORMATETC = &H40130
  9558. Const VIEW_S_ALREADY_FROZEN = &H40140
  9559. Const CACHE_S_FORMATETC_NOTSUPPORTED = &H40170
  9560. Const CACHE_S_SAMECACHE = &H40171
  9561. Const CACHE_S_SOMECACHES_NOTUPDATED = &H40172
  9562. Const OLEOBJ_S_INVALIDVERB = &H40180
  9563. Const OLEOBJ_S_CANNOT_DOVERB_NOW = &H40181
  9564. Const OLEOBJ_S_INVALIDHWND = &H40182
  9565. Const INPLACE_S_TRUNCATED = &H401A0
  9566. Const CONVERT10_S_NO_PRESENTATION = &H401C0
  9567. Const MK_S_REDUCED_TO_SELF = &H401E2
  9568. Const MK_S_ME = &H401E4
  9569. Const MK_S_HIM = &H401E5
  9570. Const MK_S_US = &H401E6
  9571. Const MK_S_MONIKERALREADYREGISTERED = &H401E7
  9572. Const CO_E_CLASS_CREATE_FAILED = &H80080001
  9573. Const CO_E_SCM_ERROR = &H80080002
  9574. Const CO_E_SCM_RPC_FAILURE = &H80080003
  9575. Const CO_E_BAD_PATH = &H80080004
  9576. Const CO_E_SERVER_EXEC_FAILURE = &H80080005
  9577. Const CO_E_OBJSRV_RPC_FAILURE = &H80080006
  9578. Const MK_E_NO_NORMALIZED = &H80080007
  9579. Const CO_E_SERVER_STOPPING = &H80080008
  9580. Const MEM_E_INVALID_ROOT = &H80080009
  9581. Const MEM_E_INVALID_LINK = &H80080010
  9582. Const MEM_E_INVALID_SIZE = &H80080011
  9583. Const DISP_E_UNKNOWNINTERFACE = &H80020001
  9584. Const DISP_E_MEMBERNOTFOUND = &H80020003
  9585. Const DISP_E_PARAMNOTFOUND = &H80020004
  9586. Const DISP_E_TYPEMISMATCH = &H80020005
  9587. Const DISP_E_UNKNOWNNAME = &H80020006
  9588. Const DISP_E_NONAMEDARGS = &H80020007
  9589. Const DISP_E_BADVARTYPE = &H80020008
  9590. Const DISP_E_EXCEPTION = &H80020009
  9591. Const DISP_E_OVERFLOW = &H8002000A
  9592. Const DISP_E_BADINDEX = &H8002000B
  9593. Const DISP_E_UNKNOWNLCID = &H8002000C
  9594. Const DISP_E_ARRAYISLOCKED = &H8002000D
  9595. Const DISP_E_BADPARAMCOUNT = &H8002000E
  9596. Const DISP_E_PARAMNOTOPTIONAL = &H8002000F
  9597. Const DISP_E_BADCALLEE = &H80020010
  9598. Const DISP_E_NOTACOLLECTION = &H80020011
  9599. Const TYPE_E_BUFFERTOOSMALL = &H80028016
  9600. Const TYPE_E_INVDATAREAD = &H80028018
  9601. Const TYPE_E_UNSUPFORMAT = &H80028019
  9602. Const TYPE_E_REGISTRYACCESS = &H8002801C
  9603. Const TYPE_E_LIBNOTREGISTERED = &H8002801D
  9604. Const TYPE_E_UNDEFINEDTYPE = &H80028027
  9605. Const TYPE_E_QUALIFIEDNAMEDISALLOWED = &H80028028
  9606. Const TYPE_E_INVALIDSTATE = &H80028029
  9607. Const TYPE_E_WRONGTYPEKIND = &H8002802A
  9608. Const TYPE_E_ELEMENTNOTFOUND = &H8002802B
  9609. Const TYPE_E_AMBIGUOUSNAME = &H8002802C
  9610. Const TYPE_E_NAMECONFLICT = &H8002802D
  9611. Const TYPE_E_UNKNOWNLCID = &H8002802E
  9612. Const TYPE_E_DLLFUNCTIONNOTFOUND = &H8002802F
  9613. Const TYPE_E_BADMODULEKIND = &H800288BD
  9614. Const TYPE_E_SIZETOOBIG = &H800288C5
  9615. Const TYPE_E_DUPLICATEID = &H800288C6
  9616. Const TYPE_E_INVALIDID = &H800288CF
  9617. Const TYPE_E_TYPEMISMATCH = &H80028CA0
  9618. Const TYPE_E_OUTOFBOUNDS = &H80028CA1
  9619. Const TYPE_E_IOERROR = &H80028CA2
  9620. Const TYPE_E_CANTCREATETMPFILE = &H80028CA3
  9621. Const TYPE_E_CANTLOADLIBRARY = &H80029C4A
  9622. Const TYPE_E_INCONSISTENTPROPFUNCS = &H80029C83
  9623. Const TYPE_E_CIRCULARTYPE = &H80029C84
  9624. Const STG_E_INVALIDFUNCTION = &H80030001
  9625. Const STG_E_FILENOTFOUND = &H80030002
  9626. Const STG_E_PATHNOTFOUND = &H80030003
  9627. Const STG_E_TOOMANYOPENFILES = &H80030004
  9628. Const STG_E_ACCESSDENIED = &H80030005
  9629. Const STG_E_INVALIDHANDLE = &H80030006
  9630. Const STG_E_INSUFFICIENTMEMORY = &H80030008
  9631. Const STG_E_INVALIDPOINTER = &H80030009
  9632. Const STG_E_NOMOREFILES = &H80030012
  9633. Const STG_E_DISKISWRITEPROTECTED = &H80030013
  9634. Const STG_E_SEEKERROR = &H80030019
  9635. Const STG_E_WRITEFAULT = &H8003001D
  9636. Const STG_E_READFAULT = &H8003001E
  9637. Const STG_E_SHAREVIOLATION = &H80030020
  9638. Const STG_E_LOCKVIOLATION = &H80030021
  9639. Const STG_E_FILEALREADYEXISTS = &H80030050
  9640. Const STG_E_INVALIDPARAMETER = &H80030057
  9641. Const STG_E_MEDIUMFULL = &H80030070
  9642. Const STG_E_ABNORMALAPIEXIT = &H800300FA
  9643. Const STG_E_INVALIDHEADER = &H800300FB
  9644. Const STG_E_INVALIDNAME = &H800300FC
  9645. Const STG_E_UNKNOWN = &H800300FD
  9646. Const STG_E_UNIMPLEMENTEDFUNCTION = &H800300FE
  9647. Const STG_E_INVALIDFLAG = &H800300FF
  9648. Const STG_E_INUSE = &H80030100
  9649. Const STG_E_NOTCURRENT = &H80030101
  9650. Const STG_E_REVERTED = &H80030102
  9651. Const STG_E_CANTSAVE = &H80030103
  9652. Const STG_E_OLDFORMAT = &H80030104
  9653. Const STG_E_OLDDLL = &H80030105
  9654. Const STG_E_SHAREREQUIRED = &H80030106
  9655. Const STG_E_NOTFILEBASEDSTORAGE = &H80030107
  9656. Const STG_E_EXTANTMARSHALLINGS = &H80030108
  9657. Const STG_S_CONVERTED = &H30200
  9658. Const RPC_E_CALL_REJECTED = &H80010001
  9659. Const RPC_E_CALL_CANCELED = &H80010002
  9660. Const RPC_E_CANTPOST_INSENDCALL = &H80010003
  9661. Const RPC_E_CANTCALLOUT_INASYNCCALL = &H80010004
  9662. Const RPC_E_CANTCALLOUT_INEXTERNALCALL = &H80010005
  9663. Const RPC_E_CONNECTION_TERMINATED = &H80010006
  9664. Const RPC_E_SERVER_DIED = &H80010007
  9665. Const RPC_E_CLIENT_DIED = &H80010008
  9666. Const RPC_E_INVALID_DATAPACKET = &H80010009
  9667. Const RPC_E_CANTTRANSMIT_CALL = &H8001000A
  9668. Const RPC_E_CLIENT_CANTMARSHAL_DATA = &H8001000B
  9669. Const RPC_E_CLIENT_CANTUNMARSHAL_DATA = &H8001000C
  9670. Const RPC_E_SERVER_CANTMARSHAL_DATA = &H8001000D
  9671. Const RPC_E_SERVER_CANTUNMARSHAL_DATA = &H8001000E
  9672. Const RPC_E_INVALID_DATA = &H8001000F
  9673. Const RPC_E_INVALID_PARAMETER = &H80010010
  9674. Const RPC_E_CANTCALLOUT_AGAIN = &H80010011
  9675. Const RPC_E_SERVER_DIED_DNE = &H80010012
  9676. Const RPC_E_SYS_CALL_FAILED = &H80010100
  9677. Const RPC_E_OUT_OF_RESOURCES = &H80010101
  9678. Const RPC_E_ATTEMPTED_MULTITHREAD = &H80010102
  9679. Const RPC_E_NOT_REGISTERED = &H80010103
  9680. Const RPC_E_FAULT = &H80010104
  9681. Const RPC_E_SERVERFAULT = &H80010105
  9682. Const RPC_E_CHANGED_MODE = &H80010106
  9683. Const RPC_E_INVALIDMETHOD = &H80010107
  9684. Const RPC_E_DISCONNECTED = &H80010108
  9685. Const RPC_E_RETRY = &H80010109
  9686. Const RPC_E_SERVERCALL_RETRYLATER = &H8001010A
  9687. Const RPC_E_SERVERCALL_REJECTED = &H8001010B
  9688. Const RPC_E_INVALID_CALLDATA = &H8001010C
  9689. Const RPC_E_CANTCALLOUT_ININPUTSYNCCALL = &H8001010D
  9690. Const RPC_E_WRONG_THREAD = &H8001010E
  9691. Const RPC_E_THREAD_NOT_INIT = &H8001010F
  9692. Const RPC_E_UNEXPECTED = &H8001FFFF
  9693.  
  9694.  
  9695. ' /////////////////////////
  9696. '                        //
  9697. '  Winnet32 Status Codes //
  9698. '                        //
  9699. ' /////////////////////////
  9700.  
  9701. '   The specified username is invalid.
  9702. Const ERROR_BAD_USERNAME = 2202&
  9703.  
  9704. '   This network connection does not exist.
  9705. Const ERROR_NOT_CONNECTED = 2250&
  9706.  
  9707. '   This network connection has files open or requests pending.
  9708. Const ERROR_OPEN_FILES = 2401&
  9709.  
  9710. '   The device is in use by an active process and cannot be disconnected.
  9711. Const ERROR_DEVICE_IN_USE = 2404&
  9712.  
  9713. '   The specified device name is invalid.
  9714. Const ERROR_BAD_DEVICE = 1200&
  9715.  
  9716. '   The device is not currently connected but it is a remembered connection.
  9717. Const ERROR_CONNECTION_UNAVAIL = 1201&
  9718.  
  9719. '   An attempt was made to remember a device that had previously been remembered.
  9720. Const ERROR_DEVICE_ALREADY_REMEMBERED = 1202&
  9721.  
  9722. '   No network provider accepted the given network path.
  9723. Const ERROR_NO_NET_OR_BAD_PATH = 1203&
  9724.  
  9725. '   The specified network provider name is invalid.
  9726. Const ERROR_BAD_PROVIDER = 1204&
  9727.  
  9728. '   Unable to open the network connection profile.
  9729. Const ERROR_CANNOT_OPEN_PROFILE = 1205&
  9730.  
  9731. '   The network connection profile is corrupt.
  9732. Const ERROR_BAD_PROFILE = 1206&
  9733.  
  9734. '   Cannot enumerate a non-container.
  9735. Const ERROR_NOT_CONTAINER = 1207&
  9736.  
  9737. '   An extended error has occurred.
  9738. Const ERROR_EXTENDED_ERROR = 1208&
  9739.  
  9740. '   The format of the specified group name is invalid.
  9741. Const ERROR_INVALID_GROUPNAME = 1209&
  9742.  
  9743. '   The format of the specified computer name is invalid.
  9744. Const ERROR_INVALID_COMPUTERNAME = 1210&
  9745.  
  9746. '   The format of the specified event name is invalid.
  9747. Const ERROR_INVALID_EVENTNAME = 1211&
  9748.  
  9749. '   The format of the specified domain name is invalid.
  9750. Const ERROR_INVALID_DOMAINNAME = 1212&
  9751.  
  9752. '   The format of the specified service name is invalid.
  9753. Const ERROR_INVALID_SERVICENAME = 1213&
  9754.  
  9755. '   The format of the specified network name is invalid.
  9756. Const ERROR_INVALID_NETNAME = 1214&
  9757.  
  9758. '   The format of the specified share name is invalid.
  9759. Const ERROR_INVALID_SHARENAME = 1215&
  9760.  
  9761. '   The format of the specified password is invalid.
  9762. Const ERROR_INVALID_PASSWORDNAME = 1216&
  9763.  
  9764. '   The format of the specified message name is invalid.
  9765. Const ERROR_INVALID_MESSAGENAME = 1217&
  9766.  
  9767. '   The format of the specified message destination is invalid.
  9768. Const ERROR_INVALID_MESSAGEDEST = 1218&
  9769.  
  9770. '   The credentials supplied conflict with an existing set of credentials.
  9771. Const ERROR_SESSION_CREDENTIAL_CONFLICT = 1219&
  9772.  
  9773. '   An attempt was made to establish a session to a Lan Manager server, but there
  9774. '   are already too many sessions established to that server.
  9775. Const ERROR_REMOTE_SESSION_LIMIT_EXCEEDED = 1220&
  9776.  
  9777. '   The workgroup or domain name is already in use by another computer on the
  9778. '   network.
  9779. Const ERROR_DUP_DOMAINNAME = 1221&
  9780.  
  9781. '   The network is not present or not started.
  9782. Const ERROR_NO_NETWORK = 1222&
  9783.  
  9784.  
  9785. ' /////////////////////////
  9786. '                        //
  9787. '  Security Status Codes //
  9788. '                        //
  9789. ' /////////////////////////
  9790.  
  9791. '   Not all privileges referenced are assigned to the caller.
  9792. Const ERROR_NOT_ALL_ASSIGNED = 1300&
  9793.  
  9794. '   Some mapping between account names and security IDs was not done.
  9795. Const ERROR_SOME_NOT_MAPPED = 1301&
  9796.  
  9797. '   No system quota limits are specifically set for this account.
  9798. Const ERROR_NO_QUOTAS_FOR_ACCOUNT = 1302&
  9799.  
  9800. '   No encryption key is available.  A well-known encryption key was returned.
  9801. Const ERROR_LOCAL_USER_SESSION_KEY = 1303&
  9802.  
  9803. '   The NT password is too complex to be converted to a LAN Manager
  9804. '   password.  The LAN Manager password returned is a NULL string.
  9805. Const ERROR_NULL_LM_PASSWORD = 1304&
  9806.  
  9807. '   The revision level is unknown.
  9808. Const ERROR_UNKNOWN_REVISION = 1305&
  9809.  
  9810. '   Indicates two revision levels are incompatible.
  9811. Const ERROR_REVISION_MISMATCH = 1306&
  9812.  
  9813. '   This security ID may not be assigned as the owner of this object.
  9814. Const ERROR_INVALID_OWNER = 1307&
  9815.  
  9816. '   This security ID may not be assigned as the primary group of an object.
  9817. Const ERROR_INVALID_PRIMARY_GROUP = 1308&
  9818.  
  9819. '   An attempt has been made to operate on an impersonation token
  9820. '   by a thread that is not currently impersonating a client.
  9821. Const ERROR_NO_IMPERSONATION_TOKEN = 1309&
  9822.  
  9823. '   The group may not be disabled.
  9824. Const ERROR_CANT_DISABLE_MANDATORY = 1310&
  9825.  
  9826. '   There are currently no logon servers available to service the logon
  9827. '   request.
  9828. Const ERROR_NO_LOGON_SERVERS = 1311&
  9829.  
  9830. '    A specified logon session does not exist.  It may already have
  9831. '    been terminated.
  9832. Const ERROR_NO_SUCH_LOGON_SESSION = 1312&
  9833.  
  9834. '    A specified privilege does not exist.
  9835. Const ERROR_NO_SUCH_PRIVILEGE = 1313&
  9836.  
  9837. '    A required privilege is not held by the client.
  9838. Const ERROR_PRIVILEGE_NOT_HELD = 1314&
  9839.  
  9840. '   The name provided is not a properly formed account name.
  9841. Const ERROR_INVALID_ACCOUNT_NAME = 1315&
  9842.  
  9843. '   The specified user already exists.
  9844. Const ERROR_USER_EXISTS = 1316&
  9845.  
  9846. '   The specified user does not exist.
  9847. Const ERROR_NO_SUCH_USER = 1317&
  9848.  
  9849. '   The specified group already exists.
  9850. Const ERROR_GROUP_EXISTS = 1318&
  9851.  
  9852. '   The specified group does not exist.
  9853. Const ERROR_NO_SUCH_GROUP = 1319&
  9854.  
  9855. '   Either the specified user account is already a member of the specified
  9856. '   group, or the specified group cannot be deleted because it contains
  9857. '   a member.
  9858. Const ERROR_MEMBER_IN_GROUP = 1320&
  9859.  
  9860. '   The specified user account is not a member of the specified group account.
  9861. Const ERROR_MEMBER_NOT_IN_GROUP = 1321&
  9862.  
  9863. '   The last remaining administration account cannot be disabled
  9864. '   or deleted.
  9865. Const ERROR_LAST_ADMIN = 1322&
  9866.  
  9867. '   Unable to update the password.  The value provided as the current
  9868. '   password is incorrect.
  9869. Const ERROR_WRONG_PASSWORD = 1323&
  9870.  
  9871. '   Unable to update the password.  The value provided for the new password
  9872. '   contains values that are not allowed in passwords.
  9873. Const ERROR_ILL_FORMED_PASSWORD = 1324&
  9874.  
  9875. '   Unable to update the password because a password update rule has been
  9876. '   violated.
  9877. Const ERROR_PASSWORD_RESTRICTION = 1325&
  9878.  
  9879. '   Logon failure: unknown user name or bad password.
  9880. Const ERROR_LOGON_FAILURE = 1326&
  9881.  
  9882. '   Logon failure: user account restriction.
  9883. Const ERROR_ACCOUNT_RESTRICTION = 1327&
  9884.  
  9885. '   Logon failure: account logon time restriction violation.
  9886. Const ERROR_INVALID_LOGON_HOURS = 1328&
  9887.  
  9888. '   Logon failure: user not allowed to log on to this computer.
  9889. Const ERROR_INVALID_WORKSTATION = 1329&
  9890.  
  9891. '   Logon failure: the specified account password has expired.
  9892. Const ERROR_PASSWORD_EXPIRED = 1330&
  9893.  
  9894. '   Logon failure: account currently disabled.
  9895. Const ERROR_ACCOUNT_DISABLED = 1331&
  9896.  
  9897. '   No mapping between account names and security IDs was done.
  9898. Const ERROR_NONE_MAPPED = 1332&
  9899.  
  9900. '   Too many local user identifiers (LUIDs) were requested at one time.
  9901. Const ERROR_TOO_MANY_LUIDS_REQUESTED = 1333&
  9902.  
  9903. '   No more local user identifiers (LUIDs) are available.
  9904. Const ERROR_LUIDS_EXHAUSTED = 1334&
  9905.  
  9906. '   The subauthority part of a security ID is invalid for this particular use.
  9907. Const ERROR_INVALID_SUB_AUTHORITY = 1335&
  9908.  
  9909. '   The access control list (ACL) structure is invalid.
  9910. Const ERROR_INVALID_ACL = 1336&
  9911.  
  9912. '   The security ID structure is invalid.
  9913. Const ERROR_INVALID_SID = 1337&
  9914.  
  9915. '   The security descriptor structure is invalid.
  9916. Const ERROR_INVALID_SECURITY_DESCR = 1338&
  9917.  
  9918. '   The inherited access control list (ACL) or access control entry (ACE)
  9919. '   could not be built.
  9920. Const ERROR_BAD_INHERITANCE_ACL = 1340&
  9921.  
  9922. '   The server is currently disabled.
  9923. Const ERROR_SERVER_DISABLED = 1341&
  9924.  
  9925. '   The server is currently enabled.
  9926. Const ERROR_SERVER_NOT_DISABLED = 1342&
  9927.  
  9928. '   The value provided was an invalid value for an identifier authority.
  9929. Const ERROR_INVALID_ID_AUTHORITY = 1343&
  9930.  
  9931. '   No more memory is available for security information updates.
  9932. Const ERROR_ALLOTTED_SPACE_EXCEEDED = 1344&
  9933.  
  9934. '   The specified attributes are invalid, or incompatible with the
  9935. '   attributes for the group as a whole.
  9936. Const ERROR_INVALID_GROUP_ATTRIBUTES = 1345&
  9937.  
  9938. '   Either a required impersonation level was not provided, or the
  9939. '   provided impersonation level is invalid.
  9940. Const ERROR_BAD_IMPERSONATION_LEVEL = 1346&
  9941.  
  9942. '   Cannot open an anonymous level security token.
  9943. Const ERROR_CANT_OPEN_ANONYMOUS = 1347&
  9944.  
  9945. '   The validation information class requested was invalid.
  9946. Const ERROR_BAD_VALIDATION_CLASS = 1348&
  9947.  
  9948. '   The type of the token is inappropriate for its attempted use.
  9949. Const ERROR_BAD_TOKEN_TYPE = 1349&
  9950.  
  9951. '   Unable to perform a security operation on an object
  9952. '   which has no associated security.
  9953. Const ERROR_NO_SECURITY_ON_OBJECT = 1350&
  9954.  
  9955. '   Indicates a Windows NT Advanced Server could not be contacted or that
  9956. '   objects within the domain are protected such that necessary
  9957. '   information could not be retrieved.
  9958. Const ERROR_CANT_ACCESS_DOMAIN_INFO = 1351&
  9959.  
  9960. '   The security account manager (SAM) or local security
  9961. '   authority (LSA) server was in the wrong state to perform
  9962. '   the security operation.
  9963. Const ERROR_INVALID_SERVER_STATE = 1352&
  9964.  
  9965. '   The domain was in the wrong state to perform the security operation.
  9966. Const ERROR_INVALID_DOMAIN_STATE = 1353&
  9967.  
  9968. '   This operation is only allowed for the Primary Domain Controller of the domain.
  9969. Const ERROR_INVALID_DOMAIN_ROLE = 1354&
  9970.  
  9971. '   The specified domain did not exist.
  9972. Const ERROR_NO_SUCH_DOMAIN = 1355&
  9973.  
  9974. '   The specified domain already exists.
  9975. Const ERROR_DOMAIN_EXISTS = 1356&
  9976.  
  9977. '   An attempt was made to exceed the limit on the number of domains per server.
  9978. Const ERROR_DOMAIN_LIMIT_EXCEEDED = 1357&
  9979.  
  9980. '   Unable to complete the requested operation because of either a
  9981. '   catastrophic media failure or a data structure corruption on the disk.
  9982. Const ERROR_INTERNAL_DB_CORRUPTION = 1358&
  9983.  
  9984. '   The security account database contains an internal inconsistency.
  9985. Const ERROR_INTERNAL_ERROR = 1359&
  9986.  
  9987. '   Generic access types were contained in an access mask which should
  9988. '   already be mapped to non-generic types.
  9989. Const ERROR_GENERIC_NOT_MAPPED = 1360&
  9990.  
  9991. '   A security descriptor is not in the right format (absolute or self-relative).
  9992. Const ERROR_BAD_DESCRIPTOR_FORMAT = 1361&
  9993.  
  9994. '   The requested action is restricted for use by logon processes
  9995. '   only.  The calling process has not registered as a logon process.
  9996. Const ERROR_NOT_LOGON_PROCESS = 1362&
  9997.  
  9998. '   Cannot start a new logon session with an ID that is already in use.
  9999. Const ERROR_LOGON_SESSION_EXISTS = 1363&
  10000.  
  10001. '   A specified authentication package is unknown.
  10002. Const ERROR_NO_SUCH_PACKAGE = 1364&
  10003.  
  10004. '   The logon session is not in a state that is consistent with the
  10005. '   requested operation.
  10006. Const ERROR_BAD_LOGON_SESSION_STATE = 1365&
  10007.  
  10008. '   The logon session ID is already in use.
  10009. Const ERROR_LOGON_SESSION_COLLISION = 1366&
  10010.  
  10011. '   A logon request contained an invalid logon type value.
  10012. Const ERROR_INVALID_LOGON_TYPE = 1367&
  10013.  
  10014. '   Unable to impersonate via a named pipe until data has been read
  10015. '   from that pipe.
  10016. Const ERROR_CANNOT_IMPERSONATE = 1368&
  10017.  
  10018. '   The transaction state of a Registry subtree is incompatible with the
  10019. '   requested operation.
  10020. Const ERROR_RXACT_INVALID_STATE = 1369&
  10021.  
  10022. '   An internal security database corruption has been encountered.
  10023. Const ERROR_RXACT_COMMIT_FAILURE = 1370&
  10024.  
  10025. '   Cannot perform this operation on built-in accounts.
  10026. Const ERROR_SPECIAL_ACCOUNT = 1371&
  10027.  
  10028. '   Cannot perform this operation on this built-in special group.
  10029. Const ERROR_SPECIAL_GROUP = 1372&
  10030.  
  10031. '   Cannot perform this operation on this built-in special user.
  10032. Const ERROR_SPECIAL_USER = 1373&
  10033.  
  10034. '   The user cannot be removed from a group because the group
  10035. '   is currently the user's primary group.
  10036. Const ERROR_MEMBERS_PRIMARY_GROUP = 1374&
  10037.  
  10038. '   The token is already in use as a primary token.
  10039. Const ERROR_TOKEN_ALREADY_IN_USE = 1375&
  10040.  
  10041. '   The specified local group does not exist.
  10042. Const ERROR_NO_SUCH_ALIAS = 1376&
  10043.  
  10044. '   The specified account name is not a member of the local group.
  10045. Const ERROR_MEMBER_NOT_IN_ALIAS = 1377&
  10046.  
  10047. '   The specified account name is already a member of the local group.
  10048. Const ERROR_MEMBER_IN_ALIAS = 1378&
  10049.  
  10050. '   The specified local group already exists.
  10051. Const ERROR_ALIAS_EXISTS = 1379&
  10052.  
  10053. '   Logon failure: the user has not been granted the requested
  10054. '   logon type at this computer.
  10055. Const ERROR_LOGON_NOT_GRANTED = 1380&
  10056.  
  10057. '   The maximum number of secrets that may be stored in a single system has been
  10058. '   exceeded.
  10059. Const ERROR_TOO_MANY_SECRETS = 1381&
  10060.  
  10061. '   The length of a secret exceeds the maximum length allowed.
  10062. Const ERROR_SECRET_TOO_LONG = 1382&
  10063.  
  10064. '   The local security authority database contains an internal inconsistency.
  10065. Const ERROR_INTERNAL_DB_ERROR = 1383&
  10066.  
  10067. '   During a logon attempt, the user's security context accumulated too many
  10068. '   security IDs.
  10069. Const ERROR_TOO_MANY_CONTEXT_IDS = 1384&
  10070.  
  10071. '   Logon failure: the user has not been granted the requested logon type
  10072. '   at this computer.
  10073. Const ERROR_LOGON_TYPE_NOT_GRANTED = 1385&
  10074.  
  10075. '   A cross-encrypted password is necessary to change a user password.
  10076. Const ERROR_NT_CROSS_ENCRYPTION_REQUIRED = 1386&
  10077.  
  10078. '   A new member could not be added to a local group because the member does
  10079. '   not exist.
  10080. Const ERROR_NO_SUCH_MEMBER = 1387&
  10081.  
  10082. '   A new member could not be added to a local group because the member has the
  10083. '   wrong account type.
  10084. Const ERROR_INVALID_MEMBER = 1388&
  10085.  
  10086. '   Too many security IDs have been specified.
  10087. Const ERROR_TOO_MANY_SIDS = 1389&
  10088.  
  10089. '   A cross-encrypted password is necessary to change this user password.
  10090. Const ERROR_LM_CROSS_ENCRYPTION_REQUIRED = 1390&
  10091.  
  10092. '   Indicates an ACL contains no inheritable components
  10093. Const ERROR_NO_INHERITANCE = 1391&
  10094.  
  10095. '   The file or directory is corrupt and non-readable.
  10096. Const ERROR_FILE_CORRUPT = 1392&
  10097.  
  10098. '   The disk structure is corrupt and non-readable.
  10099. Const ERROR_DISK_CORRUPT = 1393&
  10100.  
  10101. '   There is no user session key for the specified logon session.
  10102. Const ERROR_NO_USER_SESSION_KEY = 1394&
  10103.  
  10104. '  End of security error codes
  10105.  
  10106.  
  10107. ' /////////////////////////
  10108. '                        //
  10109. '  WinUser Error Codes   //
  10110. '                        //
  10111. ' /////////////////////////
  10112.  
  10113. '   Invalid window handle.
  10114. Const ERROR_INVALID_WINDOW_HANDLE = 1400&
  10115.  
  10116. '   Invalid menu handle.
  10117. Const ERROR_INVALID_MENU_HANDLE = 1401&
  10118.  
  10119. '   Invalid cursor handle.
  10120. Const ERROR_INVALID_CURSOR_HANDLE = 1402&
  10121.  
  10122. '   Invalid accelerator table handle.
  10123. Const ERROR_INVALID_ACCEL_HANDLE = 1403&
  10124.  
  10125. '   Invalid hook handle.
  10126. Const ERROR_INVALID_HOOK_HANDLE = 1404&
  10127.  
  10128. '   Invalid handle to a multiple-window position structure.
  10129. Const ERROR_INVALID_DWP_HANDLE = 1405&
  10130.  
  10131. '   Cannot create a top-level child window.
  10132. Const ERROR_TLW_WITH_WSCHILD = 1406&
  10133.  
  10134. '   Cannot find window class.
  10135. Const ERROR_CANNOT_FIND_WND_CLASS = 1407&
  10136.  
  10137. '   Invalid window, belongs to other thread.
  10138. Const ERROR_WINDOW_OF_OTHER_THREAD = 1408&
  10139.  
  10140. '   Hot key is already registered.
  10141. Const ERROR_HOTKEY_ALREADY_REGISTERED = 1409&
  10142.  
  10143. '   Class already exists.
  10144. Const ERROR_CLASS_ALREADY_EXISTS = 1410&
  10145.  
  10146. '   Class does not exist.
  10147. Const ERROR_CLASS_DOES_NOT_EXIST = 1411&
  10148.  
  10149. '   Class still has open windows.
  10150. Const ERROR_CLASS_HAS_WINDOWS = 1412&
  10151.  
  10152. '   Invalid index.
  10153. Const ERROR_INVALID_INDEX = 1413&
  10154.  
  10155. '   Invalid icon handle.
  10156. Const ERROR_INVALID_ICON_HANDLE = 1414&
  10157.  
  10158. '   Using private DIALOG window words.
  10159. Const ERROR_PRIVATE_DIALOG_INDEX = 1415&
  10160.  
  10161. '   The listbox identifier was not found.
  10162. Const ERROR_LISTBOX_ID_NOT_FOUND = 1416&
  10163.  
  10164. '   No wildcards were found.
  10165. Const ERROR_NO_WILDCARD_CHARACTERS = 1417&
  10166.  
  10167. '   Thread does not have a clipboard open.
  10168. Const ERROR_CLIPBOARD_NOT_OPEN = 1418&
  10169.  
  10170. '   Hot key is not registered.
  10171. Const ERROR_HOTKEY_NOT_REGISTERED = 1419&
  10172.  
  10173. '   The window is not a valid dialog window.
  10174. Const ERROR_WINDOW_NOT_DIALOG = 1420&
  10175.  
  10176. '   Control ID not found.
  10177. Const ERROR_CONTROL_ID_NOT_FOUND = 1421&
  10178.  
  10179. '   Invalid message for a combo box because it does not have an edit control.
  10180. Const ERROR_INVALID_COMBOBOX_MESSAGE = 1422&
  10181.  
  10182. '   The window is not a combo box.
  10183. Const ERROR_WINDOW_NOT_COMBOBOX = 1423&
  10184.  
  10185. '   Height must be less than 256.
  10186. Const ERROR_INVALID_EDIT_HEIGHT = 1424&
  10187.  
  10188. '   Invalid device context (DC) handle.
  10189. Const ERROR_DC_NOT_FOUND = 1425&
  10190.  
  10191. '   Invalid hook procedure type.
  10192. Const ERROR_INVALID_HOOK_FILTER = 1426&
  10193.  
  10194. '   Invalid hook procedure.
  10195. Const ERROR_INVALID_FILTER_PROC = 1427&
  10196.  
  10197. '   Cannot set non-local hook without a module handle.
  10198. Const ERROR_HOOK_NEEDS_HMOD = 1428&
  10199.  
  10200. '   This hook procedure can only be set Globally.
  10201. '
  10202. Const ERROR_PUBLIC_ONLY_HOOK = 1429&
  10203.  
  10204. '   The journal hook procedure is already installed.
  10205. Const ERROR_JOURNAL_HOOK_SET = 1430&
  10206.  
  10207. '   The hook procedure is not installed.
  10208. Const ERROR_HOOK_NOT_INSTALLED = 1431&
  10209.  
  10210. '   Invalid message for single-selection listbox.
  10211. Const ERROR_INVALID_LB_MESSAGE = 1432&
  10212.  
  10213. '   LB_SETCOUNT sent to non-lazy listbox.
  10214. Const ERROR_SETCOUNT_ON_BAD_LB = 1433&
  10215.  
  10216. '   This list box does not support tab stops.
  10217. Const ERROR_LB_WITHOUT_TABSTOPS = 1434&
  10218.  
  10219. '   Cannot destroy object created by another thread.
  10220. Const ERROR_DESTROY_OBJECT_OF_OTHER_THREAD = 1435&
  10221.  
  10222. '   Child windows cannot have menus.
  10223. Const ERROR_CHILD_WINDOW_MENU = 1436&
  10224.  
  10225. '   The window does not have a system menu.
  10226. Const ERROR_NO_SYSTEM_MENU = 1437&
  10227.  
  10228. '   Invalid message box style.
  10229. Const ERROR_INVALID_MSGBOX_STYLE = 1438&
  10230.  
  10231. '   Invalid system-wide (SPI_) parameter.
  10232. Const ERROR_INVALID_SPI_VALUE = 1439&
  10233.  
  10234. '   Screen already locked.
  10235. Const ERROR_SCREEN_ALREADY_LOCKED = 1440&
  10236.  
  10237. '   All handles to windows in a multiple-window position structure must
  10238. '   have the same parent.
  10239. Const ERROR_HWNDS_HAVE_DIFF_PARENT = 1441&
  10240.  
  10241. '   The window is not a child window.
  10242. Const ERROR_NOT_CHILD_WINDOW = 1442&
  10243.  
  10244. '   Invalid GW_ command.
  10245. Const ERROR_INVALID_GW_COMMAND = 1443&
  10246.  
  10247. '   Invalid thread identifier.
  10248. Const ERROR_INVALID_THREAD_ID = 1444&
  10249.  
  10250. '   Cannot process a message from a window that is not a multiple document
  10251. '   interface (MDI) window.
  10252. Const ERROR_NON_MDICHILD_WINDOW = 1445&
  10253.  
  10254. '   Popup menu already active.
  10255. Const ERROR_POPUP_ALREADY_ACTIVE = 1446&
  10256.  
  10257. '   The window does not have scroll bars.
  10258. Const ERROR_NO_SCROLLBARS = 1447&
  10259.  
  10260. '   Scroll bar range cannot be greater than 0x7FFF.
  10261. Const ERROR_INVALID_SCROLLBAR_RANGE = 1448&
  10262.  
  10263. '   Cannot show or remove the window in the way specified.
  10264. Const ERROR_INVALID_SHOWWIN_COMMAND = 1449&
  10265.  
  10266. '  End of WinUser error codes
  10267.  
  10268.  
  10269. ' /////////////////////////
  10270. '                        //
  10271. '  Eventlog Status Codes //
  10272. '                        //
  10273. ' /////////////////////////
  10274.  
  10275. '   The event log file is corrupt.
  10276. Const ERROR_EVENTLOG_FILE_CORRUPT = 1500&
  10277.  
  10278. '   No event log file could be opened, so the event logging service did not start.
  10279. Const ERROR_EVENTLOG_CANT_START = 1501&
  10280.  
  10281. '   The event log file is full.
  10282. Const ERROR_LOG_FILE_FULL = 1502&
  10283.  
  10284. '   The event log file has changed between reads.
  10285. Const ERROR_EVENTLOG_FILE_CHANGED = 1503&
  10286.  
  10287. '  End of eventlog error codes
  10288.  
  10289.  
  10290. ' /////////////////////////
  10291. '                        //
  10292. '    RPC Status Codes    //
  10293. '                        //
  10294. ' /////////////////////////
  10295.  
  10296. '   The string binding is invalid.
  10297. Const RPC_S_INVALID_STRING_BINDING = 1700&
  10298.  
  10299. '   The binding handle is not the correct type.
  10300. Const RPC_S_WRONG_KIND_OF_BINDING = 1701&
  10301.  
  10302. '   The binding handle is invalid.
  10303. Const RPC_S_INVALID_BINDING = 1702&
  10304.  
  10305. '   The RPC protocol sequence is not supported.
  10306. Const RPC_S_PROTSEQ_NOT_SUPPORTED = 1703&
  10307.  
  10308. '   The RPC protocol sequence is invalid.
  10309. Const RPC_S_INVALID_RPC_PROTSEQ = 1704&
  10310.  
  10311. '   The string universal unique identifier (UUID) is invalid.
  10312. Const RPC_S_INVALID_STRING_UUID = 1705&
  10313.  
  10314. '   The endpoint format is invalid.
  10315. Const RPC_S_INVALID_ENDPOINT_FORMAT = 1706&
  10316.  
  10317. '   The network address is invalid.
  10318. Const RPC_S_INVALID_NET_ADDR = 1707&
  10319.  
  10320. '   No endpoint was found.
  10321. Const RPC_S_NO_ENDPOINT_FOUND = 1708&
  10322.  
  10323. '   The timeout value is invalid.
  10324. Const RPC_S_INVALID_TIMEOUT = 1709&
  10325.  
  10326. '   The object universal unique identifier (UUID) was not found.
  10327. Const RPC_S_OBJECT_NOT_FOUND = 1710&
  10328.  
  10329. '   The object universal unique identifier (UUID) has already been registered.
  10330. Const RPC_S_ALREADY_REGISTERED = 1711&
  10331.  
  10332. '   The type universal unique identifier (UUID) has already been registered.
  10333. Const RPC_S_TYPE_ALREADY_REGISTERED = 1712&
  10334.  
  10335. '   The RPC server is already listening.
  10336. Const RPC_S_ALREADY_LISTENING = 1713&
  10337.  
  10338. '   No protocol sequences have been registered.
  10339. Const RPC_S_NO_PROTSEQS_REGISTERED = 1714&
  10340.  
  10341. '   The RPC server is not listening.
  10342. Const RPC_S_NOT_LISTENING = 1715&
  10343.  
  10344. '   The manager type is unknown.
  10345. Const RPC_S_UNKNOWN_MGR_TYPE = 1716&
  10346.  
  10347. '   The interface is unknown.
  10348. Const RPC_S_UNKNOWN_IF = 1717&
  10349.  
  10350. '   There are no bindings.
  10351. Const RPC_S_NO_BINDINGS = 1718&
  10352.  
  10353. '   There are no protocol sequences.
  10354. Const RPC_S_NO_PROTSEQS = 1719&
  10355.  
  10356. '   The endpoint cannot be created.
  10357. Const RPC_S_CANT_CREATE_ENDPOINT = 1720&
  10358.  
  10359. '   Not enough resources are available to complete this operation.
  10360. Const RPC_S_OUT_OF_RESOURCES = 1721&
  10361.  
  10362. '   The RPC server is unavailable.
  10363. Const RPC_S_SERVER_UNAVAILABLE = 1722&
  10364.  
  10365. '   The RPC server is too busy to complete this operation.
  10366. Const RPC_S_SERVER_TOO_BUSY = 1723&
  10367.  
  10368. '   The network options are invalid.
  10369. Const RPC_S_INVALID_NETWORK_OPTIONS = 1724&
  10370.  
  10371. '   There is not a remote procedure call active in this thread.
  10372. Const RPC_S_NO_CALL_ACTIVE = 1725&
  10373.  
  10374. '   The remote procedure call failed.
  10375. Const RPC_S_CALL_FAILED = 1726&
  10376.  
  10377. '   The remote procedure call failed and did not execute.
  10378. Const RPC_S_CALL_FAILED_DNE = 1727&
  10379.  
  10380. '   A remote procedure call (RPC) protocol error occurred.
  10381. Const RPC_S_PROTOCOL_ERROR = 1728&
  10382.  
  10383. '   The transfer syntax is not supported by the RPC server.
  10384. Const RPC_S_UNSUPPORTED_TRANS_SYN = 1730&
  10385.  
  10386. '   The universal unique identifier (UUID) type is not supported.
  10387. Const RPC_S_UNSUPPORTED_TYPE = 1732&
  10388.  
  10389. '   The tag is invalid.
  10390. Const RPC_S_INVALID_TAG = 1733&
  10391.  
  10392. '   The array bounds are invalid.
  10393. Const RPC_S_INVALID_BOUND = 1734&
  10394.  
  10395. '   The binding does not contain an entry name.
  10396. Const RPC_S_NO_ENTRY_NAME = 1735&
  10397.  
  10398. '   The name syntax is invalid.
  10399. Const RPC_S_INVALID_NAME_SYNTAX = 1736&
  10400.  
  10401. '   The name syntax is not supported.
  10402. Const RPC_S_UNSUPPORTED_NAME_SYNTAX = 1737&
  10403.  
  10404. '   No network address is available to use to construct a universal
  10405. '   unique identifier (UUID).
  10406. Const RPC_S_UUID_NO_ADDRESS = 1739&
  10407.  
  10408. '   The endpoint is a duplicate.
  10409. Const RPC_S_DUPLICATE_ENDPOINT = 1740&
  10410.  
  10411. '   The authentication type is unknown.
  10412. Const RPC_S_UNKNOWN_AUTHN_TYPE = 1741&
  10413.  
  10414. '   The maximum number of calls is too small.
  10415. Const RPC_S_MAX_CALLS_TOO_SMALL = 1742&
  10416.  
  10417. '   The string is too long.
  10418. Const RPC_S_STRING_TOO_LONG = 1743&
  10419.  
  10420. '   The RPC protocol sequence was not found.
  10421. Const RPC_S_PROTSEQ_NOT_FOUND = 1744&
  10422.  
  10423. '   The procedure number is out of range.
  10424. Const RPC_S_PROCNUM_OUT_OF_RANGE = 1745&
  10425.  
  10426. '   The binding does not contain any authentication information.
  10427. Const RPC_S_BINDING_HAS_NO_AUTH = 1746&
  10428.  
  10429. '   The authentication service is unknown.
  10430. Const RPC_S_UNKNOWN_AUTHN_SERVICE = 1747&
  10431.  
  10432. '   The authentication level is unknown.
  10433. Const RPC_S_UNKNOWN_AUTHN_LEVEL = 1748&
  10434.  
  10435. '   The security context is invalid.
  10436. Const RPC_S_INVALID_AUTH_IDENTITY = 1749&
  10437.  
  10438. '   The authorization service is unknown.
  10439. Const RPC_S_UNKNOWN_AUTHZ_SERVICE = 1750&
  10440.  
  10441. '   The entry is invalid.
  10442. Const EPT_S_INVALID_ENTRY = 1751&
  10443.  
  10444. '   The server endpoint cannot perform the operation.
  10445. Const EPT_S_CANT_PERFORM_OP = 1752&
  10446.  
  10447. '   There are no more endpoints available from the endpoint mapper.
  10448. Const EPT_S_NOT_REGISTERED = 1753&
  10449.  
  10450. '   No interfaces have been exported.
  10451. Const RPC_S_NOTHING_TO_EXPORT = 1754&
  10452.  
  10453. '   The entry name is incomplete.
  10454. Const RPC_S_INCOMPLETE_NAME = 1755&
  10455.  
  10456. '   The version option is invalid.
  10457. Const RPC_S_INVALID_VERS_OPTION = 1756&
  10458.  
  10459. '   There are no more members.
  10460. Const RPC_S_NO_MORE_MEMBERS = 1757&
  10461.  
  10462. '   There is nothing to unexport.
  10463. Const RPC_S_NOT_ALL_OBJS_UNEXPORTED = 1758&
  10464.  
  10465. '   The interface was not found.
  10466. Const RPC_S_INTERFACE_NOT_FOUND = 1759&
  10467.  
  10468. '   The entry already exists.
  10469. Const RPC_S_ENTRY_ALREADY_EXISTS = 1760&
  10470.  
  10471. '   The entry is not found.
  10472. Const RPC_S_ENTRY_NOT_FOUND = 1761&
  10473.  
  10474. '   The name service is unavailable.
  10475. Const RPC_S_NAME_SERVICE_UNAVAILABLE = 1762&
  10476.  
  10477. '   The network address family is invalid.
  10478. Const RPC_S_INVALID_NAF_ID = 1763&
  10479.  
  10480. '   The requested operation is not supported.
  10481. Const RPC_S_CANNOT_SUPPORT = 1764&
  10482.  
  10483. '   No security context is available to allow impersonation.
  10484. Const RPC_S_NO_CONTEXT_AVAILABLE = 1765&
  10485.  
  10486. '   An internal error occurred in a remote procedure call (RPC).
  10487. Const RPC_S_INTERNAL_ERROR = 1766&
  10488.  
  10489. '   The RPC server attempted an integer division by zero.'
  10490. Const RPC_S_ZERO_DIVIDE = 1767&
  10491.  
  10492. '   An addressing error occurred in the RPC server.
  10493. Const RPC_S_ADDRESS_ERROR = 1768&
  10494.  
  10495. '   A floating-point operation at the RPC server caused a division by zero.
  10496. Const RPC_S_FP_DIV_ZERO = 1769&
  10497.  
  10498. '   A floating-point underflow occurred at the RPC server.
  10499. Const RPC_S_FP_UNDERFLOW = 1770&
  10500.  
  10501. '   A floating-point overflow occurred at the RPC server.
  10502. Const RPC_S_FP_OVERFLOW = 1771&
  10503.  
  10504. '   The list of RPC servers available for the binding of auto handles
  10505. '   has been exhausted.
  10506. Const RPC_X_NO_MORE_ENTRIES = 1772&
  10507.  
  10508. '   Unable to open the character translation table file.
  10509. Const RPC_X_SS_CHAR_TRANS_OPEN_FAIL = 1773&
  10510.  
  10511. '   The file containing the character translation table has fewer than
  10512. '   512 bytes.
  10513. Const RPC_X_SS_CHAR_TRANS_SHORT_FILE = 1774&
  10514.  
  10515. '   A null context handle was passed from the client to the host during
  10516. '   a remote procedure call.
  10517. Const RPC_X_SS_IN_NULL_CONTEXT = 1775&
  10518.  
  10519. '   The context handle changed during a remote procedure call.
  10520. Const RPC_X_SS_CONTEXT_DAMAGED = 1777&
  10521.  
  10522. '   The binding handles passed to a remote procedure call do not match.
  10523. Const RPC_X_SS_HANDLES_MISMATCH = 1778&
  10524.  
  10525. '   The stub is unable to get the remote procedure call handle.
  10526. Const RPC_X_SS_CANNOT_GET_CALL_HANDLE = 1779&
  10527.  
  10528. '   A null reference pointer was passed to the stub.
  10529. Const RPC_X_NULL_REF_POINTER = 1780&
  10530.  
  10531. '   The enumeration value is out of range.
  10532. Const RPC_X_ENUM_VALUE_OUT_OF_RANGE = 1781&
  10533.  
  10534. '   The byte count is too small.
  10535. Const RPC_X_BYTE_COUNT_TOO_SMALL = 1782&
  10536.  
  10537. '   The stub received bad data.
  10538. Const RPC_X_BAD_STUB_DATA = 1783&
  10539.  
  10540. '   The supplied user buffer is not valid for the requested operation.
  10541. Const ERROR_INVALID_USER_BUFFER = 1784&
  10542.  
  10543. '   The disk media is not recognized.  It may not be formatted.
  10544. Const ERROR_UNRECOGNIZED_MEDIA = 1785&
  10545.  
  10546. '   The workstation does not have a trust secret.
  10547. Const ERROR_NO_TRUST_LSA_SECRET = 1786&
  10548.  
  10549. '   The SAM database on the Windows NT Advanced Server does not have a computer
  10550. '   account for this workstation trust relationship.
  10551. Const ERROR_NO_TRUST_SAM_ACCOUNT = 1787&
  10552.  
  10553. '   The trust relationship between the primary domain and the trusted
  10554. '   domain failed.
  10555. Const ERROR_TRUSTED_DOMAIN_FAILURE = 1788&
  10556.  
  10557. '   The trust relationship between this workstation and the primary
  10558. '   domain failed.
  10559. Const ERROR_TRUSTED_RELATIONSHIP_FAILURE = 1789&
  10560.  
  10561. '   The network logon failed.
  10562. Const ERROR_TRUST_FAILURE = 1790&
  10563.  
  10564. '   A remote procedure call is already in progress for this thread.
  10565. Const RPC_S_CALL_IN_PROGRESS = 1791&
  10566.  
  10567. '   An attempt was made to logon, but the network logon service was not started.
  10568. Const ERROR_NETLOGON_NOT_STARTED = 1792&
  10569.  
  10570. '   The user's account has expired.
  10571. Const ERROR_ACCOUNT_EXPIRED = 1793&
  10572.  
  10573. '   The redirector is in use and cannot be unloaded.
  10574. Const ERROR_REDIRECTOR_HAS_OPEN_HANDLES = 1794&
  10575.  
  10576. '   The specified printer driver is already installed.
  10577. Const ERROR_PRINTER_DRIVER_ALREADY_INSTALLED = 1795&
  10578.  
  10579. '   The specified port is unknown.
  10580. Const ERROR_UNKNOWN_PORT = 1796&
  10581.  
  10582. '   The printer driver is unknown.
  10583. Const ERROR_UNKNOWN_PRINTER_DRIVER = 1797&
  10584.  
  10585. '   The print processor is unknown.
  10586. '
  10587. Const ERROR_UNKNOWN_PRINTPROCESSOR = 1798&
  10588.  
  10589. '   The specified separator file is invalid.
  10590. Const ERROR_INVALID_SEPARATOR_FILE = 1799&
  10591.  
  10592. '   The specified priority is invalid.
  10593. Const ERROR_INVALID_PRIORITY = 1800&
  10594.  
  10595. '   The printer name is invalid.
  10596. Const ERROR_INVALID_PRINTER_NAME = 1801&
  10597.  
  10598. '   The printer already exists.
  10599. Const ERROR_PRINTER_ALREADY_EXISTS = 1802&
  10600.  
  10601. '   The printer command is invalid.
  10602. Const ERROR_INVALID_PRINTER_COMMAND = 1803&
  10603.  
  10604. '   The specified datatype is invalid.
  10605. Const ERROR_INVALID_DATATYPE = 1804&
  10606.  
  10607. '   The Environment specified is invalid.
  10608. Const ERROR_INVALID_ENVIRONMENT = 1805&
  10609.  
  10610. '   There are no more bindings.
  10611. Const RPC_S_NO_MORE_BINDINGS = 1806&
  10612.  
  10613. '   The account used is an interdomain trust account.  Use your Global user account or local user account to access this server.
  10614. Const ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT = 1807&
  10615.  
  10616. '   The account used is a Computer Account.  Use your Global user account or local user account to access this server.
  10617. Const ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT = 1808&
  10618.  
  10619. '   The account used is an server trust account.  Use your Global user account or local user account to access this server.
  10620. Const ERROR_NOLOGON_SERVER_TRUST_ACCOUNT = 1809&
  10621.  
  10622. '   The name or security ID (SID) of the domain specified is inconsistent
  10623. '   with the trust information for that domain.
  10624. Const ERROR_DOMAIN_TRUST_INCONSISTENT = 1810&
  10625.  
  10626. '   The server is in use and cannot be unloaded.
  10627. Const ERROR_SERVER_HAS_OPEN_HANDLES = 1811&
  10628.  
  10629. '   The specified image file did not contain a resource section.
  10630. Const ERROR_RESOURCE_DATA_NOT_FOUND = 1812&
  10631.  
  10632. '   The specified resource type can not be found in the image file.
  10633. Const ERROR_RESOURCE_TYPE_NOT_FOUND = 1813&
  10634.  
  10635. '   The specified resource name can not be found in the image file.
  10636. Const ERROR_RESOURCE_NAME_NOT_FOUND = 1814&
  10637.  
  10638. '   The specified resource language ID cannot be found in the image file.
  10639. Const ERROR_RESOURCE_LANG_NOT_FOUND = 1815&
  10640.  
  10641. '   Not enough quota is available to process this command.
  10642. Const ERROR_NOT_ENOUGH_QUOTA = 1816&
  10643.  
  10644. '   The group member was not found.
  10645. Const RPC_S_GROUP_MEMBER_NOT_FOUND = 1898&
  10646.  
  10647. '   The endpoint mapper database could not be created.
  10648. Const EPT_S_CANT_CREATE = 1899&
  10649.  
  10650. '   The object universal unique identifier (UUID) is the nil UUID.
  10651. Const RPC_S_INVALID_OBJECT = 1900&
  10652.  
  10653. '   The specified time is invalid.
  10654. Const ERROR_INVALID_TIME = 1901&
  10655.  
  10656. '   The specified Form name is invalid.
  10657. Const ERROR_INVALID_FORM_NAME = 1902&
  10658.  
  10659. '   The specified Form size is invalid
  10660. Const ERROR_INVALID_FORM_SIZE = 1903&
  10661.  
  10662. '   The specified Printer handle is already being waited on
  10663. Const ERROR_ALREADY_WAITING = 1904&
  10664.  
  10665. '   The specified Printer has been deleted
  10666. Const ERROR_PRINTER_DELETED = 1905&
  10667.  
  10668. '   The state of the Printer is invalid
  10669. Const ERROR_INVALID_PRINTER_STATE = 1906&
  10670.  
  10671. '   The list of servers for this workgroup is not currently available
  10672. Const ERROR_NO_BROWSER_SERVERS_FOUND = 6118&
  10673.  
  10674.  
  10675. ' -------------------------
  10676. '  MMSystem Section
  10677. ' -------------------------
  10678.  
  10679. ' This section defines all the support for Multimedia applications
  10680.  
  10681. '  general constants
  10682. Const MAXPNAMELEN = 32  '  max product name length (including NULL)
  10683. Const MAXERRORLENGTH = 128  '  max error text length (including final NULL)
  10684.  
  10685. Type smpte
  10686.         hour As Byte
  10687.         min As Byte
  10688.         sec As Byte
  10689.         frame As Byte
  10690.         fps As Byte
  10691.         dummy As Byte
  10692.         pad(2) As Byte
  10693. End Type
  10694.  
  10695. Type midi
  10696.         songptrpos As Long
  10697. End Type
  10698.  
  10699. Type MMTIME
  10700.         wType As Long
  10701.         u As Long
  10702. End Type
  10703.  
  10704. '  values for wType field in MMTIME struct
  10705. Const TIME_MS = &H1     '  time in Milliseconds
  10706. Const TIME_SAMPLES = &H2     '  number of wave samples
  10707. Const TIME_BYTES = &H4     '  current byte offset
  10708. Const TIME_SMPTE = &H8     '  SMPTE time
  10709. Const TIME_MIDI = &H10    '  MIDI time
  10710.  
  10711. '  Multimedia Window Messages
  10712. Const MM_JOY1MOVE = &H3A0  '  joystick
  10713. Const MM_JOY2MOVE = &H3A1
  10714. Const MM_JOY1ZMOVE = &H3A2
  10715. Const MM_JOY2ZMOVE = &H3A3
  10716. Const MM_JOY1BUTTONDOWN = &H3B5
  10717. Const MM_JOY2BUTTONDOWN = &H3B6
  10718. Const MM_JOY1BUTTONUP = &H3B7
  10719. Const MM_JOY2BUTTONUP = &H3B8
  10720.  
  10721. Const MM_MCINOTIFY = &H3B9  '  MCI
  10722. Const MM_MCISYSTEM_STRING = &H3CA
  10723.  
  10724. Const MM_WOM_OPEN = &H3BB  '  waveform output
  10725. Const MM_WOM_CLOSE = &H3BC
  10726. Const MM_WOM_DONE = &H3BD
  10727.  
  10728. Const MM_WIM_OPEN = &H3BE  '  waveform input
  10729. Const MM_WIM_CLOSE = &H3BF
  10730. Const MM_WIM_DATA = &H3C0
  10731.  
  10732. Const MM_MIM_OPEN = &H3C1  '  MIDI input
  10733. Const MM_MIM_CLOSE = &H3C2
  10734. Const MM_MIM_DATA = &H3C3
  10735. Const MM_MIM_LONGDATA = &H3C4
  10736. Const MM_MIM_ERROR = &H3C5
  10737. Const MM_MIM_LONGERROR = &H3C6
  10738.  
  10739. Const MM_MOM_OPEN = &H3C7  '  MIDI output
  10740. Const MM_MOM_CLOSE = &H3C8
  10741. Const MM_MOM_DONE = &H3C9
  10742.  
  10743. ' String resource number bases (internal use)
  10744.  
  10745. Const MMSYSERR_BASE = 0
  10746. Const WAVERR_BASE = 32
  10747. Const MIDIERR_BASE = 64
  10748. Const TIMERR_BASE = 96   '  was 128, changed to match Win 31 Sonic
  10749. Const JOYERR_BASE = 160
  10750. Const MCIERR_BASE = 256
  10751.  
  10752. Const MCI_STRING_OFFSET = 512  '  if this number is changed you MUST
  10753.                                     '  alter the MCI_DEVTYPE_... list below
  10754. Const MCI_VD_OFFSET = 1024
  10755. Const MCI_CD_OFFSET = 1088
  10756. Const MCI_WAVE_OFFSET = 1152
  10757. Const MCI_SEQ_OFFSET = 1216
  10758.  
  10759. ' General error return values
  10760. Const MMSYSERR_NOERROR = 0  '  no error
  10761. Const MMSYSERR_ERROR = (MMSYSERR_BASE + 1)  '  unspecified error
  10762. Const MMSYSERR_BADDEVICEID = (MMSYSERR_BASE + 2)  '  device ID out of range
  10763. Const MMSYSERR_NOTENABLED = (MMSYSERR_BASE + 3)  '  driver failed enable
  10764. Const MMSYSERR_ALLOCATED = (MMSYSERR_BASE + 4)  '  device already allocated
  10765. Const MMSYSERR_INVALHANDLE = (MMSYSERR_BASE + 5)  '  device handle is invalid
  10766. Const MMSYSERR_NODRIVER = (MMSYSERR_BASE + 6)  '  no device driver present
  10767. Const MMSYSERR_NOMEM = (MMSYSERR_BASE + 7)  '  memory allocation error
  10768. Const MMSYSERR_NOTSUPPORTED = (MMSYSERR_BASE + 8)  '  function isn't supported
  10769. Const MMSYSERR_BADERRNUM = (MMSYSERR_BASE + 9)  '  error value out of range
  10770. Const MMSYSERR_INVALFLAG = (MMSYSERR_BASE + 10) '  invalid flag passed
  10771. Const MMSYSERR_INVALPARAM = (MMSYSERR_BASE + 11) '  invalid parameter passed
  10772. Const MMSYSERR_HANDLEBUSY = (MMSYSERR_BASE + 12) '  handle being used
  10773.                                                    '  simultaneously on another
  10774.                                                    '  thread (eg callback)
  10775. Const MMSYSERR_INVALIDALIAS = (MMSYSERR_BASE + 13) '  "Specified alias not found in WIN.INI
  10776. Const MMSYSERR_LASTERROR = (MMSYSERR_BASE + 13) '  last error in range
  10777. Const MM_MOM_POSITIONCB = &H3CA              '  Callback for MEVT_POSITIONCB
  10778. Const MM_MCISIGNAL = &H3CB
  10779. Const MM_MIM_MOREDATA = &H3CC                '  MIM_DONE w/ pending events
  10780. Const MIDICAPS_STREAM = &H8               '  driver supports midiStreamOut directly
  10781.  
  10782.  
  10783. Type MIDIEVENT
  10784.         dwDeltaTime As Long          '  Ticks since last event
  10785.         dwStreamID As Long           '  Reserved; must be zero
  10786.         dwEvent As Long              '  Event type and parameters
  10787.         dwParms(1) As Long           '  Parameters if this is a long event
  10788. End Type
  10789.  
  10790. Type MIDISTRMBUFFVER
  10791.         dwVersion As Long                  '  Stream buffer format version
  10792.         dwMid As Long                      '  Manufacturer ID as defined in MMREG.H
  10793.         dwOEMVersion As Long               '  Manufacturer version for custom ext
  10794. End Type
  10795.  
  10796. '  Type codes which go in the high byte of the event DWORD of a stream buffer
  10797.  
  10798. '  Type codes 00-7F contain parameters within the low 24 bits
  10799. '  Type codes 80-FF contain a length of their parameter in the low 24
  10800. '  bits, followed by their parameter data in the buffer. The event
  10801. '  DWORD contains the exact byte length; the parm data itself must be
  10802. '  padded to be an even multiple of 4 Byte long.
  10803. '
  10804.  
  10805. Const MEVT_F_SHORT = &H0&
  10806. Const MEVT_F_LONG = &H80000000
  10807. Const MEVT_F_CALLBACK = &H40000000
  10808. Const MIDISTRM_ERROR = -2
  10809.  
  10810. '
  10811. '  Structures and defines for midiStreamProperty
  10812. '
  10813. Const MIDIPROP_SET = &H80000000
  10814. Const MIDIPROP_GET = &H40000000
  10815.  
  10816. '  These are intentionally both non-zero so the app cannot accidentally
  10817. '  leave the operation off and happen to appear to work due to default
  10818. '  action.
  10819.  
  10820. Const MIDIPROP_TIMEDIV = &H1&
  10821. Const MIDIPROP_TEMPO = &H2&
  10822.  
  10823. Type MIDIPROPTIMEDIV
  10824.         cbStruct As Long
  10825.         dwTimeDiv As Long
  10826. End Type
  10827.  
  10828. Type MIDIPROPTEMPO
  10829.         cbStruct As Long
  10830.         dwTempo As Long
  10831. End Type
  10832.  
  10833.  
  10834. '  MIDI function prototypes *
  10835.  
  10836. ' ***************************************************************************
  10837.  
  10838. '                             Mixer Support
  10839.  
  10840. ' **************************************************************************
  10841.  
  10842. Const MIXER_SHORT_NAME_CHARS = 16
  10843. Const MIXER_LONG_NAME_CHARS = 64
  10844.  
  10845. '
  10846. '   MMRESULT error return values specific to the mixer API
  10847. '
  10848. '
  10849. Const MIXERR_BASE = 1024
  10850. Const MIXERR_INVALLINE = (MIXERR_BASE + 0)
  10851. Const MIXERR_INVALCONTROL = (MIXERR_BASE + 1)
  10852. Const MIXERR_INVALVALUE = (MIXERR_BASE + 2)
  10853. Const MIXERR_LASTERROR = (MIXERR_BASE + 2)
  10854.  
  10855.  
  10856. Const MIXER_OBJECTF_HANDLE = &H80000000
  10857. Const MIXER_OBJECTF_MIXER = &H0&
  10858. Const MIXER_OBJECTF_HMIXER = (MIXER_OBJECTF_HANDLE Or MIXER_OBJECTF_MIXER)
  10859. Const MIXER_OBJECTF_WAVEOUT = &H10000000
  10860. Const MIXER_OBJECTF_HWAVEOUT = (MIXER_OBJECTF_HANDLE Or MIXER_OBJECTF_WAVEOUT)
  10861. Const MIXER_OBJECTF_WAVEIN = &H20000000
  10862. Const MIXER_OBJECTF_HWAVEIN = (MIXER_OBJECTF_HANDLE Or MIXER_OBJECTF_WAVEIN)
  10863. Const MIXER_OBJECTF_MIDIOUT = &H30000000
  10864. Const MIXER_OBJECTF_HMIDIOUT = (MIXER_OBJECTF_HANDLE Or MIXER_OBJECTF_MIDIOUT)
  10865. Const MIXER_OBJECTF_MIDIIN = &H40000000
  10866. Const MIXER_OBJECTF_HMIDIIN = (MIXER_OBJECTF_HANDLE Or MIXER_OBJECTF_MIDIIN)
  10867. Const MIXER_OBJECTF_AUX = &H50000000
  10868.  
  10869. Declare Function mixerGetNumDevs Lib "winmm.dll" Alias "mixerGetNumDevs" () As Long
  10870.  
  10871. Type MIXERCAPS
  10872.         wMid As Integer                   '  manufacturer id
  10873.         wPid As Integer                   '  product id
  10874.         vDriverVersion As Long            '  version of the driver
  10875.         szPname As String * MAXPNAMELEN   '  product name
  10876.         fdwSupport As Long             '  misc. support bits
  10877.         cDestinations As Long          '  count of destinations
  10878. End Type
  10879.  
  10880. Declare Function mixerGetDevCaps Lib "winmm.dll" Alias "mixerGetDevCapsA" (ByVal uMxId As Long, ByVal pmxcaps As MIXERCAPS, ByVal cbmxcaps As Long) As Long
  10881. Declare Function mixerOpen Lib "winmm.dll" Alias "mixerOpen" (phmx As Long, ByVal uMxId As Long, ByVal dwCallback As Long, ByVal dwInstance As Long, ByVal fdwOpen As Long) As Long
  10882. Declare Function mixerClose Lib "winmm.dll" Alias "mixerClose" (ByVal hmx As Long) As Long
  10883. Declare Function mixerMessage Lib "winmm.dll" Alias "mixerMessage" (ByVal hmx As Long, ByVal uMsg As Long, ByVal dwParam1 As Long, ByVal dwParam2 As Long) As Long
  10884.  
  10885. Type Target    ' for use in MIXERLINE and others (embedded structure)
  10886.         
  10887.         dwType As Long                 '  MIXERLINE_TARGETTYPE_xxxx
  10888.         dwDeviceID As Long             '  target device ID of device type
  10889.         wMid As Integer                   '  of target device
  10890.         wPid As Integer                   '       "
  10891.         vDriverVersion As Long            '       "
  10892.         szPname As String * MAXPNAMELEN
  10893. End Type
  10894.  
  10895. Type MIXERLINE
  10896.         cbStruct As Long               '  size of MIXERLINE structure
  10897.         dwDestination As Long          '  zero based destination index
  10898.         dwSource As Long               '  zero based source index (if source)
  10899.         dwLineID As Long               '  unique line id for mixer device
  10900.         fdwLine As Long                '  state/information about line
  10901.         dwUser As Long                 '  driver specific information
  10902.         dwComponentType As Long        '  component type line connects to
  10903.         cChannels As Long              '  number of channels line supports
  10904.         cConnections As Long           '  number of connections (possible)
  10905.         cControls As Long              '  number of controls at this line
  10906.         szShortName As String * MIXER_SHORT_NAME_CHARS
  10907.         szName As String * MIXER_LONG_NAME_CHARS
  10908.         tTarget As Target
  10909. End Type
  10910.  
  10911. '   MIXERLINE.fdwLine
  10912.  
  10913. Const MIXERLINE_LINEF_ACTIVE = &H1&
  10914. Const MIXERLINE_LINEF_DISCONNECTED = &H8000&
  10915. Const MIXERLINE_LINEF_SOURCE = &H80000000
  10916.  
  10917. '   MIXERLINE.dwComponentType
  10918.  
  10919. '   component types for destinations and sources
  10920.  
  10921. Const MIXERLINE_COMPONENTTYPE_DST_FIRST = &H0&
  10922. Const MIXERLINE_COMPONENTTYPE_DST_UNDEFINED = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 0)
  10923. Const MIXERLINE_COMPONENTTYPE_DST_DIGITAL = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 1)
  10924. Const MIXERLINE_COMPONENTTYPE_DST_LINE = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 2)
  10925. Const MIXERLINE_COMPONENTTYPE_DST_MONITOR = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 3)
  10926. Const MIXERLINE_COMPONENTTYPE_DST_SPEAKERS = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 4)
  10927. Const MIXERLINE_COMPONENTTYPE_DST_HEADPHONES = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 5)
  10928. Const MIXERLINE_COMPONENTTYPE_DST_TELEPHONE = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 6)
  10929. Const MIXERLINE_COMPONENTTYPE_DST_WAVEIN = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 7)
  10930. Const MIXERLINE_COMPONENTTYPE_DST_VOICEIN = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 8)
  10931. Const MIXERLINE_COMPONENTTYPE_DST_LAST = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 8)
  10932.  
  10933. Const MIXERLINE_COMPONENTTYPE_SRC_FIRST = &H1000&
  10934. Const MIXERLINE_COMPONENTTYPE_SRC_UNDEFINED = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 0)
  10935. Const MIXERLINE_COMPONENTTYPE_SRC_DIGITAL = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 1)
  10936. Const MIXERLINE_COMPONENTTYPE_SRC_LINE = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 2)
  10937. Const MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 3)
  10938. Const MIXERLINE_COMPONENTTYPE_SRC_SYNTHESIZER = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 4)
  10939. Const MIXERLINE_COMPONENTTYPE_SRC_COMPACTDISC = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 5)
  10940. Const MIXERLINE_COMPONENTTYPE_SRC_TELEPHONE = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 6)
  10941. Const MIXERLINE_COMPONENTTYPE_SRC_PCSPEAKER = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 7)
  10942. Const MIXERLINE_COMPONENTTYPE_SRC_WAVEOUT = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 8)
  10943. Const MIXERLINE_COMPONENTTYPE_SRC_AUXILIARY = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 9)
  10944. Const MIXERLINE_COMPONENTTYPE_SRC_ANALOG = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 10)
  10945. Const MIXERLINE_COMPONENTTYPE_SRC_LAST = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 10)
  10946.  
  10947.  
  10948. '
  10949. '   MIXERLINE.Target.dwType
  10950. '
  10951. '
  10952. Const MIXERLINE_TARGETTYPE_UNDEFINED = 0
  10953. Const MIXERLINE_TARGETTYPE_WAVEOUT = 1
  10954. Const MIXERLINE_TARGETTYPE_WAVEIN = 2
  10955. Const MIXERLINE_TARGETTYPE_MIDIOUT = 3
  10956. Const MIXERLINE_TARGETTYPE_MIDIIN = 4
  10957. Const MIXERLINE_TARGETTYPE_AUX = 5
  10958.  
  10959. Declare Function mixerGetLineInfo Lib "winmm.dll" Alias "mixerGetLineInfoA" (ByVal hmxobj As Long, pmxl As MIXERLINE, ByVal fdwInfo As Long) As Long
  10960. Const MIXER_GETLINEINFOF_DESTINATION = &H0&
  10961. Const MIXER_GETLINEINFOF_SOURCE = &H1&
  10962. Const MIXER_GETLINEINFOF_LINEID = &H2&
  10963. Const MIXER_GETLINEINFOF_COMPONENTTYPE = &H3&
  10964. Const MIXER_GETLINEINFOF_TARGETTYPE = &H4&
  10965. Const MIXER_GETLINEINFOF_QUERYMASK = &HF&
  10966.  
  10967. Declare Function mixerGetID Lib "winmm.dll" Alias "mixerGetID" (ByVal hmxobj As Long, pumxID As Long, ByVal fdwId As Long) As Long
  10968.  
  10969. '   MIXERCONTROL
  10970.  
  10971.  
  10972. Type MIXERCONTROL
  10973.         cbStruct As Long           '  size in Byte of MIXERCONTROL
  10974.         dwControlID As Long        '  unique control id for mixer device
  10975.         dwControlType As Long      '  MIXERCONTROL_CONTROLTYPE_xxx
  10976.         fdwControl As Long         '  MIXERCONTROL_CONTROLF_xxx
  10977.         cMultipleItems As Long     '  if MIXERCONTROL_CONTROLF_MULTIPLE set
  10978.         szShortName As String * MIXER_SHORT_NAME_CHARS
  10979.         szName As String * MIXER_LONG_NAME_CHARS
  10980.         Bounds(1 To 6) As Long     '  Longest member of the Bounds union
  10981.         Metrics(1 To 6) As Long    '  Longest member of the Metrics union
  10982. End Type
  10983.  
  10984. '
  10985. '   MIXERCONTROL.fdwControl
  10986.  
  10987. Const MIXERCONTROL_CONTROLF_UNIFORM = &H1&
  10988. Const MIXERCONTROL_CONTROLF_MULTIPLE = &H2&
  10989. Const MIXERCONTROL_CONTROLF_DISABLED = &H80000000
  10990.  
  10991. '   MIXERCONTROL_CONTROLTYPE_xxx building block defines
  10992.  
  10993. Const MIXERCONTROL_CT_CLASS_MASK = &HF0000000
  10994. Const MIXERCONTROL_CT_CLASS_CUSTOM = &H0&
  10995. Const MIXERCONTROL_CT_CLASS_METER = &H10000000
  10996. Const MIXERCONTROL_CT_CLASS_SWITCH = &H20000000
  10997. Const MIXERCONTROL_CT_CLASS_NUMBER = &H30000000
  10998. Const MIXERCONTROL_CT_CLASS_SLIDER = &H40000000
  10999. Const MIXERCONTROL_CT_CLASS_FADER = &H50000000
  11000. Const MIXERCONTROL_CT_CLASS_TIME = &H60000000
  11001. Const MIXERCONTROL_CT_CLASS_LIST = &H70000000
  11002. Const MIXERCONTROL_CT_SUBCLASS_MASK = &HF000000
  11003. Const MIXERCONTROL_CT_SC_SWITCH_BOOLEAN = &H0&
  11004. Const MIXERCONTROL_CT_SC_SWITCH_BUTTON = &H1000000
  11005. Const MIXERCONTROL_CT_SC_METER_POLLED = &H0&
  11006. Const MIXERCONTROL_CT_SC_TIME_MICROSECS = &H0&
  11007. Const MIXERCONTROL_CT_SC_TIME_MILLISECS = &H1000000
  11008. Const MIXERCONTROL_CT_SC_LIST_SINGLE = &H0&
  11009. Const MIXERCONTROL_CT_SC_LIST_MULTIPLE = &H1000000
  11010. Const MIXERCONTROL_CT_UNITS_MASK = &HFF0000
  11011. Const MIXERCONTROL_CT_UNITS_CUSTOM = &H0&
  11012. Const MIXERCONTROL_CT_UNITS_BOOLEAN = &H10000
  11013. Const MIXERCONTROL_CT_UNITS_SIGNED = &H20000
  11014. Const MIXERCONTROL_CT_UNITS_UNSIGNED = &H30000
  11015. Const MIXERCONTROL_CT_UNITS_DECIBELS = &H40000 '  in 10ths
  11016. Const MIXERCONTROL_CT_UNITS_PERCENT = &H50000 '  in 10ths
  11017. '
  11018. '   Commonly used control types for specifying MIXERCONTROL.dwControlType
  11019. '
  11020. Const MIXERCONTROL_CONTROLTYPE_CUSTOM = (MIXERCONTROL_CT_CLASS_CUSTOM Or MIXERCONTROL_CT_UNITS_CUSTOM)
  11021. Const MIXERCONTROL_CONTROLTYPE_BOOLEANMETER = (MIXERCONTROL_CT_CLASS_METER Or MIXERCONTROL_CT_SC_METER_POLLED Or MIXERCONTROL_CT_UNITS_BOOLEAN)
  11022. Const MIXERCONTROL_CONTROLTYPE_SIGNEDMETER = (MIXERCONTROL_CT_CLASS_METER Or MIXERCONTROL_CT_SC_METER_POLLED Or MIXERCONTROL_CT_UNITS_SIGNED)
  11023. Const MIXERCONTROL_CONTROLTYPE_PEAKMETER = (MIXERCONTROL_CONTROLTYPE_SIGNEDMETER + 1)
  11024. Const MIXERCONTROL_CONTROLTYPE_UNSIGNEDMETER = (MIXERCONTROL_CT_CLASS_METER Or MIXERCONTROL_CT_SC_METER_POLLED Or MIXERCONTROL_CT_UNITS_UNSIGNED)
  11025. Const MIXERCONTROL_CONTROLTYPE_BOOLEAN = (MIXERCONTROL_CT_CLASS_SWITCH Or MIXERCONTROL_CT_SC_SWITCH_BOOLEAN Or MIXERCONTROL_CT_UNITS_BOOLEAN)
  11026. Const MIXERCONTROL_CONTROLTYPE_ONOFF = (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 1)
  11027. Const MIXERCONTROL_CONTROLTYPE_MUTE = (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 2)
  11028. Const MIXERCONTROL_CONTROLTYPE_MONO = (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 3)
  11029. Const MIXERCONTROL_CONTROLTYPE_LOUDNESS = (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 4)
  11030. Const MIXERCONTROL_CONTROLTYPE_STEREOENH = (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 5)
  11031. Const MIXERCONTROL_CONTROLTYPE_BUTTON = (MIXERCONTROL_CT_CLASS_SWITCH Or MIXERCONTROL_CT_SC_SWITCH_BUTTON Or MIXERCONTROL_CT_UNITS_BOOLEAN)
  11032. Const MIXERCONTROL_CONTROLTYPE_DECIBELS = (MIXERCONTROL_CT_CLASS_NUMBER Or MIXERCONTROL_CT_UNITS_DECIBELS)
  11033. Const MIXERCONTROL_CONTROLTYPE_SIGNED = (MIXERCONTROL_CT_CLASS_NUMBER Or MIXERCONTROL_CT_UNITS_SIGNED)
  11034. Const MIXERCONTROL_CONTROLTYPE_UNSIGNED = (MIXERCONTROL_CT_CLASS_NUMBER Or MIXERCONTROL_CT_UNITS_UNSIGNED)
  11035. Const MIXERCONTROL_CONTROLTYPE_PERCENT = (MIXERCONTROL_CT_CLASS_NUMBER Or MIXERCONTROL_CT_UNITS_PERCENT)
  11036. Const MIXERCONTROL_CONTROLTYPE_SLIDER = (MIXERCONTROL_CT_CLASS_SLIDER Or MIXERCONTROL_CT_UNITS_SIGNED)
  11037. Const MIXERCONTROL_CONTROLTYPE_PAN = (MIXERCONTROL_CONTROLTYPE_SLIDER + 1)
  11038. Const MIXERCONTROL_CONTROLTYPE_QSOUNDPAN = (MIXERCONTROL_CONTROLTYPE_SLIDER + 2)
  11039. Const MIXERCONTROL_CONTROLTYPE_FADER = (MIXERCONTROL_CT_CLASS_FADER Or MIXERCONTROL_CT_UNITS_UNSIGNED)
  11040. Const MIXERCONTROL_CONTROLTYPE_VOLUME = (MIXERCONTROL_CONTROLTYPE_FADER + 1)
  11041. Const MIXERCONTROL_CONTROLTYPE_BASS = (MIXERCONTROL_CONTROLTYPE_FADER + 2)
  11042. Const MIXERCONTROL_CONTROLTYPE_TREBLE = (MIXERCONTROL_CONTROLTYPE_FADER + 3)
  11043. Const MIXERCONTROL_CONTROLTYPE_EQUALIZER = (MIXERCONTROL_CONTROLTYPE_FADER + 4)
  11044. Const MIXERCONTROL_CONTROLTYPE_SINGLESELECT = (MIXERCONTROL_CT_CLASS_LIST Or MIXERCONTROL_CT_SC_LIST_SINGLE Or MIXERCONTROL_CT_UNITS_BOOLEAN)
  11045. Const MIXERCONTROL_CONTROLTYPE_MUX = (MIXERCONTROL_CONTROLTYPE_SINGLESELECT + 1)
  11046. Const MIXERCONTROL_CONTROLTYPE_MULTIPLESELECT = (MIXERCONTROL_CT_CLASS_LIST Or MIXERCONTROL_CT_SC_LIST_MULTIPLE Or MIXERCONTROL_CT_UNITS_BOOLEAN)
  11047. Const MIXERCONTROL_CONTROLTYPE_MIXER = (MIXERCONTROL_CONTROLTYPE_MULTIPLESELECT + 1)
  11048. Const MIXERCONTROL_CONTROLTYPE_MICROTIME = (MIXERCONTROL_CT_CLASS_TIME Or MIXERCONTROL_CT_SC_TIME_MICROSECS Or MIXERCONTROL_CT_UNITS_UNSIGNED)
  11049. Const MIXERCONTROL_CONTROLTYPE_MILLITIME = (MIXERCONTROL_CT_CLASS_TIME Or MIXERCONTROL_CT_SC_TIME_MILLISECS Or MIXERCONTROL_CT_UNITS_UNSIGNED)
  11050. '
  11051. '   MIXERLINECONTROLS
  11052. '
  11053. Type MIXERLINECONTROLS
  11054.         cbStruct As Long       '  size in Byte of MIXERLINECONTROLS
  11055.         dwLineID As Long       '  line id (from MIXERLINE.dwLineID)
  11056.                                              '  MIXER_GETLINECONTROLSF_ONEBYID or
  11057.         dwControl As Long  '  MIXER_GETLINECONTROLSF_ONEBYTYPE
  11058.         cControls As Long      '  count of controls pmxctrl points to
  11059.         cbmxctrl As Long       '  size in Byte of _one_ MIXERCONTROL
  11060.         pamxctrl As MIXERCONTROL       '  pointer to first MIXERCONTROL array
  11061. End Type
  11062.  
  11063. Declare Function mixerGetLineControls Lib "winmm.dll" Alias "mixerGetLineControlsA" (ByVal hmxobj As Long, pmxlc As MIXERLINECONTROLS, ByVal fdwControls As Long) As Long
  11064.  
  11065. Const MIXER_GETLINECONTROLSF_ALL = &H0&
  11066. Const MIXER_GETLINECONTROLSF_ONEBYID = &H1&
  11067. Const MIXER_GETLINECONTROLSF_ONEBYTYPE = &H2&
  11068. Const MIXER_GETLINECONTROLSF_QUERYMASK = &HF&
  11069.  
  11070. Type MIXERCONTROLDETAILS
  11071.         cbStruct As Long       '  size in Byte of MIXERCONTROLDETAILS
  11072.         dwControlID As Long    '  control id to get/set details on
  11073.         cChannels As Long      '  number of channels in paDetails array
  11074.         item As Long                           ' hwndOwner or cMultipleItems
  11075.         cbDetails As Long      '  size of _one_ details_XX struct
  11076.         paDetails As Long      '  pointer to array of details_XX structs
  11077. End Type
  11078.  
  11079. '   MIXER_GETCONTROLDETAILSF_LISTTEXT
  11080.  
  11081. Type MIXERCONTROLDETAILS_LISTTEXT
  11082.         dwParam1 As Long
  11083.         dwParam2 As Long
  11084.         szName As String * MIXER_LONG_NAME_CHARS
  11085. End Type
  11086.  
  11087. '   MIXER_GETCONTROLDETAILSF_VALUE
  11088.  
  11089. Type MIXERCONTROLDETAILS_BOOLEAN
  11090.         fValue As Long
  11091. End Type
  11092.  
  11093. Type MIXERCONTROLDETAILS_SIGNED
  11094.         lValue As Long
  11095. End Type
  11096.  
  11097. Type MIXERCONTROLDETAILS_UNSIGNED
  11098.         dwValue As Long
  11099. End Type
  11100.  
  11101. Declare Function mixerGetControlDetails Lib "winmm.dll" Alias "mixerGetControlDetailsA" (ByVal hmxobj As Long, pmxcd As MIXERCONTROLDETAILS, ByVal fdwDetails As Long) As Long
  11102.  
  11103. Const MIXER_GETCONTROLDETAILSF_VALUE = &H0&
  11104. Const MIXER_GETCONTROLDETAILSF_LISTTEXT = &H1&
  11105. Const MIXER_GETCONTROLDETAILSF_QUERYMASK = &HF&
  11106.  
  11107. Declare Function mixerSetControlDetails Lib "winmm.dll" Alias "mixerSetControlDetails" (ByVal hmxobj As Long, pmxcd As MIXERCONTROLDETAILS, ByVal fdwDetails As Long) As Long
  11108.  
  11109. Const MIXER_SETCONTROLDETAILSF_VALUE = &H0&
  11110. Const MIXER_SETCONTROLDETAILSF_CUSTOM = &H1&
  11111. Const MIXER_SETCONTROLDETAILSF_QUERYMASK = &HF&
  11112.  
  11113. '  constants used with JOYINFOEX
  11114. Const JOY_BUTTON5 = &H10&
  11115. Const JOY_BUTTON6 = &H20&
  11116. Const JOY_BUTTON7 = &H40&
  11117. Const JOY_BUTTON8 = &H80&
  11118. Const JOY_BUTTON9 = &H100&
  11119. Const JOY_BUTTON10 = &H200&
  11120. Const JOY_BUTTON11 = &H400&
  11121. Const JOY_BUTTON12 = &H800&
  11122. Const JOY_BUTTON13 = &H1000&
  11123. Const JOY_BUTTON14 = &H2000&
  11124. Const JOY_BUTTON15 = &H4000&
  11125. Const JOY_BUTTON16 = &H8000&
  11126. Const JOY_BUTTON17 = &H10000
  11127. Const JOY_BUTTON18 = &H20000
  11128. Const JOY_BUTTON19 = &H40000
  11129. Const JOY_BUTTON20 = &H80000
  11130. Const JOY_BUTTON21 = &H100000
  11131. Const JOY_BUTTON22 = &H200000
  11132. Const JOY_BUTTON23 = &H400000
  11133. Const JOY_BUTTON24 = &H800000
  11134. Const JOY_BUTTON25 = &H1000000
  11135. Const JOY_BUTTON26 = &H2000000
  11136. Const JOY_BUTTON27 = &H4000000
  11137. Const JOY_BUTTON28 = &H8000000
  11138. Const JOY_BUTTON29 = &H10000000
  11139. Const JOY_BUTTON30 = &H20000000
  11140. Const JOY_BUTTON31 = &H40000000
  11141. Const JOY_BUTTON32 = &H80000000
  11142.  
  11143. '  constants used with JOYINFOEX structure
  11144. Const JOY_POVCENTERED = -1
  11145. Const JOY_POVFORWARD = 0
  11146. Const JOY_POVRIGHT = 9000
  11147. Const JOY_POVBACKWARD = 18000
  11148. Const JOY_POVLEFT = 27000
  11149. Const JOY_RETURNX = &H1&
  11150. Const JOY_RETURNY = &H2&
  11151. Const JOY_RETURNZ = &H4&
  11152. Const JOY_RETURNR = &H8&
  11153. Const JOY_RETURNU = &H10                             '  axis 5
  11154. Const JOY_RETURNV = &H20                             '  axis 6
  11155. Const JOY_RETURNPOV = &H40&
  11156. Const JOY_RETURNBUTTONS = &H80&
  11157. Const JOY_RETURNRAWDATA = &H100&
  11158. Const JOY_RETURNPOVCTS = &H200&
  11159. Const JOY_RETURNCENTERED = &H400&
  11160. Const JOY_USEDEADZONE = &H800&
  11161. Const JOY_RETURNALL = (JOY_RETURNX Or JOY_RETURNY Or JOY_RETURNZ Or JOY_RETURNR Or JOY_RETURNU Or JOY_RETURNV Or JOY_RETURNPOV Or JOY_RETURNBUTTONS)
  11162. Const JOY_CAL_READALWAYS = &H10000
  11163. Const JOY_CAL_READXYONLY = &H20000
  11164. Const JOY_CAL_READ3 = &H40000
  11165. Const JOY_CAL_READ4 = &H80000
  11166. Const JOY_CAL_READXONLY = &H100000
  11167. Const JOY_CAL_READYONLY = &H200000
  11168. Const JOY_CAL_READ5 = &H400000
  11169. Const JOY_CAL_READ6 = &H800000
  11170. Const JOY_CAL_READZONLY = &H1000000
  11171. Const JOY_CAL_READRONLY = &H2000000
  11172. Const JOY_CAL_READUONLY = &H4000000
  11173. Const JOY_CAL_READVONLY = &H8000000
  11174.  
  11175. Declare Function joyGetPos Lib "winmm.dll" Alias "joyGetPos" (ByVal uJoyID As Long, pji As JOYINFO) As Long
  11176. Declare Function joyGetPosEx Lib "winmm.dll" Alias "joyGetPosEx" (ByVal uJoyID As Long, pji As JOYINFOEX) As Long
  11177. Const WAVE_FORMAT_QUERY = &H1
  11178. Const SND_PURGE = &H40               '  purge non-static events for task
  11179. Const SND_APPLICATION = &H80         '  look for application specific association
  11180. Const WAVE_MAPPED = &H4
  11181. Const WAVE_FORMAT_DIRECT = &H8
  11182. Const WAVE_FORMAT_DIRECT_QUERY = (WAVE_FORMAT_QUERY Or WAVE_FORMAT_DIRECT)
  11183. Const MIM_MOREDATA = MM_MIM_MOREDATA
  11184. Const MOM_POSITIONCB = MM_MOM_POSITIONCB
  11185.  
  11186. '  flags for dwFlags parm of midiInOpen()
  11187. Const MIDI_IO_STATUS = &H20&
  11188.  
  11189. Declare Function midiStreamOpen Lib "winmm.dll" Alias "midiStreamOpen" (phms As Long, puDeviceID As Long, ByVal cMidi As Long, ByVal dwCallback As Long, ByVal dwInstance As Long, ByVal fdwOpen As Long) As Long
  11190. Declare Function midiStreamClose Lib "winmm.dll" Alias "midiStreamClose" (ByVal hms As Long) As Long
  11191.  
  11192. Declare Function midiStreamProperty Lib "winmm.dll" Alias "midiStreamProperty" (ByVal hms As Long, lppropdata As Byte, ByVal dwProperty As Long) As Long
  11193. Declare Function midiStreamPosition Lib "winmm.dll" Alias "midiStreamPosition" (ByVal hms As Long, lpmmt As MMTIME, ByVal cbmmt As Long) As Long
  11194. Declare Function midiStreamOut Lib "winmm.dll" Alias "midiStreamOut" (ByVal hms As Long, pmh As MIDIHDR, ByVal cbmh As Long) As Long
  11195. Declare Function midiStreamPause Lib "winmm.dll" Alias "midiStreamPause" (ByVal hms As Long) As Long
  11196. Declare Function midiStreamRestart Lib "winmm.dll" Alias "midiStreamRestart" (ByVal hms As Long) As Long
  11197. Declare Function midiStreamStop Lib "winmm.dll" Alias "midiStreamStop" (ByVal hms As Long) As Long
  11198. Declare Function midiConnect Lib "winmm.dll" Alias "midiConnect" (ByVal hmi As Long, ByVal hmo As Long, pReserved As Any) As Long
  11199. Declare Function midiDisconnect Lib "winmm.dll" Alias "midiDisconnect" (ByVal hmi As Long, ByVal hmo As Long, pReserved As Any) As Long
  11200.  
  11201. Type JOYINFOEX
  11202.         dwSize As Long                 '  size of structure
  11203.         dwFlags As Long                 '  flags to indicate what to return
  11204.         dwXpos As Long                '  x position
  11205.         dwYpos As Long                '  y position
  11206.         dwZpos As Long                '  z position
  11207.         dwRpos As Long                 '  rudder/4th axis position
  11208.         dwUpos As Long                 '  5th axis position
  11209.         dwVpos As Long                 '  6th axis position
  11210.         dwButtons As Long             '  button states
  11211.         dwButtonNumber As Long        '  current button number pressed
  11212.         dwPOV As Long                 '  point of view state
  11213.         dwReserved1 As Long                 '  reserved for communication between winmm driver
  11214.         dwReserved2 As Long                 '  reserved for future expansion
  11215. End Type
  11216. ' Installable driver support
  11217.  
  11218. ' Driver messages
  11219. Const DRV_LOAD = &H1
  11220. Const DRV_ENABLE = &H2
  11221. Const DRV_OPEN = &H3
  11222. Const DRV_CLOSE = &H4
  11223. Const DRV_DISABLE = &H5
  11224. Const DRV_FREE = &H6
  11225. Const DRV_CONFIGURE = &H7
  11226. Const DRV_QUERYCONFIGURE = &H8
  11227. Const DRV_INSTALL = &H9
  11228. Const DRV_REMOVE = &HA
  11229. Const DRV_EXITSESSION = &HB
  11230. Const DRV_POWER = &HF
  11231. Const DRV_RESERVED = &H800
  11232. Const DRV_USER = &H4000
  11233.  
  11234. Type DRVCONFIGINFO
  11235.         dwDCISize As Long
  11236.         lpszDCISectionName As String
  11237.         lpszDCIAliasName As String
  11238.         dnDevNode As Long
  11239. End Type
  11240.  
  11241. ' Supported return values for DRV_CONFIGURE message
  11242. Const DRVCNF_CANCEL = &H0
  11243. Const DRVCNF_OK = &H1
  11244. Const DRVCNF_RESTART = &H2
  11245.  
  11246. '  return values from DriverProc() function
  11247. Const DRV_CANCEL = DRVCNF_CANCEL
  11248. Const DRV_OK = DRVCNF_OK
  11249. Const DRV_RESTART = DRVCNF_RESTART
  11250.  
  11251. Declare Function CloseDriver Lib "winmm.dll" Alias "CloseDriver" (ByVal hDriver As Long, ByVal lParam1 As Long, ByVal lParam2 As Long) As Long
  11252. Declare Function OpenDriver Lib "winmm.dll" Alias "OpenDriver" (ByVal szDriverName As String, ByVal szSectionName As String, ByVal lParam2 As Long) As Long
  11253. Declare Function SendDriverMessage Lib "winmm.dll" Alias "SendDriverMessage" (ByVal hDriver As Long, ByVal message As Long, ByVal lParam1 As Long, ByVal lParam2 As Long) As Long
  11254. Declare Function DrvGetModuleHandle Lib "winmm.dll" Alias "DrvGetModuleHandle" (ByVal hDriver As Long) As Long
  11255. Declare Function GetDriverModuleHandle Lib "winmm.dll" Alias "GetDriverModuleHandle" (ByVal hDriver As Long) As Long
  11256. Declare Function DefDriverProc Lib "winmm.dll" Alias "DefDriverProc" (ByVal dwDriverIdentifier As Long, ByVal hdrvr As Long, ByVal uMsg As Long, ByVal lParam1 As Long, ByVal lParam2 As Long) As Long
  11257.  
  11258. Const DRV_MCI_FIRST = DRV_RESERVED
  11259. Const DRV_MCI_LAST = DRV_RESERVED + &HFFF
  11260.  
  11261. ' Driver callback support
  11262.  
  11263. '  flags used with waveOutOpen(), waveInOpen(), midiInOpen(), and
  11264. '  midiOutOpen() to specify the type of the dwCallback parameter.
  11265. Const CALLBACK_TYPEMASK = &H70000      '  callback type mask
  11266. Const CALLBACK_NULL = &H0        '  no callback
  11267. Const CALLBACK_WINDOW = &H10000      '  dwCallback is a HWND
  11268. Const CALLBACK_TASK = &H20000      '  dwCallback is a HTASK
  11269. Const CALLBACK_FUNCTION = &H30000      '  dwCallback is a FARPROC
  11270.  
  11271. '  manufacturer IDs
  11272. Const MM_MICROSOFT = 1  '  Microsoft Corp.
  11273.  
  11274. '  product IDs
  11275. Const MM_MIDI_MAPPER = 1  '  MIDI Mapper
  11276. Const MM_WAVE_MAPPER = 2  '  Wave Mapper
  11277.  
  11278. Const MM_SNDBLST_MIDIOUT = 3  '  Sound Blaster MIDI output port
  11279. Const MM_SNDBLST_MIDIIN = 4  '  Sound Blaster MIDI input port
  11280. Const MM_SNDBLST_SYNTH = 5  '  Sound Blaster internal synthesizer
  11281. Const MM_SNDBLST_WAVEOUT = 6  '  Sound Blaster waveform output
  11282. Const MM_SNDBLST_WAVEIN = 7  '  Sound Blaster waveform input
  11283.  
  11284. Const MM_ADLIB = 9  '  Ad Lib-compatible synthesizer
  11285.  
  11286. Const MM_MPU401_MIDIOUT = 10  '  MPU401-compatible MIDI output port
  11287. Const MM_MPU401_MIDIIN = 11  '  MPU401-compatible MIDI input port
  11288.  
  11289. Const MM_PC_JOYSTICK = 12  '  Joystick adapter
  11290.  
  11291. Declare Function mmsystemGetVersion Lib "winmm.dll" Alias "mmsystemGetVersion" () As Long
  11292. Declare Sub OutputDebugStr Lib "winmm.dll" Alias "OutputDebugStr" (ByVal lpszOutputString As String)
  11293.  
  11294. Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
  11295.  
  11296. '  flag values for uFlags parameter
  11297. Const SND_SYNC = &H0         '  play synchronously (default)
  11298. Const SND_ASYNC = &H1         '  play asynchronously
  11299.  
  11300. Const SND_NODEFAULT = &H2         '  silence not default, if sound not found
  11301.  
  11302. Const SND_MEMORY = &H4         '  lpszSoundName points to a memory file
  11303. Const SND_ALIAS = &H10000     '  name is a WIN.INI [sounds] entry
  11304. Const SND_FILENAME = &H20000     '  name is a file name
  11305. Const SND_RESOURCE = &H40004     '  name is a resource name or atom
  11306. Const SND_ALIAS_ID = &H110000    '  name is a WIN.INI [sounds] entry identifier
  11307.  
  11308. Const SND_ALIAS_START = 0  '  must be > 4096 to keep strings in same section of resource file
  11309.  
  11310. Const SND_LOOP = &H8         '  loop the sound until next sndPlaySound
  11311. Const SND_NOSTOP = &H10        '  don't stop any currently playing sound
  11312. Const SND_VALID = &H1F        '  valid flags          / ;Internal /
  11313.  
  11314. Const SND_NOWAIT = &H2000      '  don't wait if the driver is busy
  11315.  
  11316. Const SND_VALIDFLAGS = &H17201F    '  Set of valid flag bits.  Anything outside
  11317.                                     '  this range will raise an error
  11318. Const SND_RESERVED = &HFF000000  '  In particular these flags are reserved
  11319.  
  11320. Const SND_TYPE_MASK = &H170007
  11321.  
  11322. Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long
  11323.  
  11324. '  waveform audio error return values
  11325. Const WAVERR_BADFORMAT = (WAVERR_BASE + 0)    '  unsupported wave format
  11326. Const WAVERR_STILLPLAYING = (WAVERR_BASE + 1)    '  still something playing
  11327. Const WAVERR_UNPREPARED = (WAVERR_BASE + 2)    '  header not prepared
  11328. Const WAVERR_SYNC = (WAVERR_BASE + 3)    '  device is synchronous
  11329. Const WAVERR_LASTERROR = (WAVERR_BASE + 3)    '  last error in range
  11330.  
  11331. '  wave callback messages
  11332. Const WOM_OPEN = MM_WOM_OPEN
  11333. Const WOM_CLOSE = MM_WOM_CLOSE
  11334. Const WOM_DONE = MM_WOM_DONE
  11335. Const WIM_OPEN = MM_WIM_OPEN
  11336. Const WIM_CLOSE = MM_WIM_CLOSE
  11337. Const WIM_DATA = MM_WIM_DATA
  11338.  
  11339. '  device ID for wave device mapper
  11340. Const WAVE_MAPPER = -1&
  11341.  
  11342. '  flags for dwFlags parameter in waveOutOpen() and waveInOpen()
  11343.  
  11344. Const WAVE_ALLOWSYNC = &H2
  11345. Const WAVE_VALID = &H3         '  ;Internal
  11346.  
  11347. Type WAVEHDR
  11348.         lpData As String
  11349.         dwBufferLength As Long
  11350.         dwBytesRecorded As Long
  11351.         dwUser As Long
  11352.         dwFlags As Long
  11353.         dwLoops As Long
  11354.         lpNext As Long
  11355.         Reserved As Long
  11356. End Type
  11357.  
  11358. '  flags for dwFlags field of WAVEHDR
  11359. Const WHDR_DONE = &H1         '  done bit
  11360. Const WHDR_PREPARED = &H2         '  set if this header has been prepared
  11361. Const WHDR_BEGINLOOP = &H4         '  loop start block
  11362. Const WHDR_ENDLOOP = &H8         '  loop end block
  11363. Const WHDR_INQUEUE = &H10        '  reserved for driver
  11364. Const WHDR_VALID = &H1F        '  valid flags      / ;Internal /
  11365.  
  11366. Type WAVEOUTCAPS
  11367.         wMid As Integer
  11368.         wPid As Integer
  11369.         vDriverVersion As Long
  11370.         szPname As String * MAXPNAMELEN
  11371.         dwFormats As Long
  11372.         wChannels As Integer
  11373.         dwSupport As Long
  11374. End Type
  11375.  
  11376. '  flags for dwSupport field of WAVEOUTCAPS
  11377. Const WAVECAPS_PITCH = &H1         '  supports pitch control
  11378. Const WAVECAPS_PLAYBACKRATE = &H2         '  supports playback rate control
  11379. Const WAVECAPS_VOLUME = &H4         '  supports volume control
  11380. Const WAVECAPS_LRVOLUME = &H8         '  separate left-right volume control
  11381. Const WAVECAPS_SYNC = &H10
  11382.  
  11383. Type WAVEINCAPS
  11384.         wMid As Integer
  11385.         wPid As Integer
  11386.         vDriverVersion As Long
  11387.         szPname As String * MAXPNAMELEN
  11388.         dwFormats As Long
  11389.         wChannels As Integer
  11390. End Type
  11391.  
  11392. '  defines for dwFormat field of WAVEINCAPS and WAVEOUTCAPS
  11393. Const WAVE_INVALIDFORMAT = &H0              '  invalid format
  11394. Const WAVE_FORMAT_1M08 = &H1              '  11.025 kHz, Mono,   8-bit
  11395. Const WAVE_FORMAT_1S08 = &H2              '  11.025 kHz, Stereo, 8-bit
  11396. Const WAVE_FORMAT_1M16 = &H4              '  11.025 kHz, Mono,   16-bit
  11397. Const WAVE_FORMAT_1S16 = &H8              '  11.025 kHz, Stereo, 16-bit
  11398. Const WAVE_FORMAT_2M08 = &H10             '  22.05  kHz, Mono,   8-bit
  11399. Const WAVE_FORMAT_2S08 = &H20             '  22.05  kHz, Stereo, 8-bit
  11400. Const WAVE_FORMAT_2M16 = &H40             '  22.05  kHz, Mono,   16-bit
  11401. Const WAVE_FORMAT_2S16 = &H80             '  22.05  kHz, Stereo, 16-bit
  11402. Const WAVE_FORMAT_4M08 = &H100            '  44.1   kHz, Mono,   8-bit
  11403. Const WAVE_FORMAT_4S08 = &H200            '  44.1   kHz, Stereo, 8-bit
  11404. Const WAVE_FORMAT_4M16 = &H400            '  44.1   kHz, Mono,   16-bit
  11405. Const WAVE_FORMAT_4S16 = &H800            '  44.1   kHz, Stereo, 16-bit
  11406.  
  11407. '  flags for wFormatTag field of WAVEFORMAT
  11408. Const WAVE_FORMAT_PCM = 1  '  Needed in resource files so outside #ifndef RC_INVOKED
  11409.  
  11410. Type WAVEFORMAT
  11411.         wFormatTag As Integer
  11412.         nChannels As Integer
  11413.         nSamplesPerSec As Long
  11414.         nAvgBytesPerSec As Long
  11415.         nBlockAlign As Integer
  11416. End Type
  11417.  
  11418. Type PCMWAVEFORMAT
  11419.         wf As WAVEFORMAT
  11420.         wBitsPerSample As Integer
  11421. End Type
  11422.  
  11423. Declare Function waveOutGetNumDevs Lib "winmm.dll" Alias "waveOutGetNumDevs" () As Long
  11424. Declare Function waveOutGetDevCaps Lib "winmm.dll" Alias "waveOutGetDevCapsA" (ByVal uDeviceID As Long, lpCaps As WAVEOUTCAPS, ByVal uSize As Long) As Long
  11425.  
  11426. Declare Function waveOutGetVolume Lib "winmm.dll" Alias "waveOutGetVolume" (ByVal uDeviceID As Long, lpdwVolume As Long) As Long
  11427. Declare Function waveOutSetVolume Lib "winmm.dll" Alias "waveOutSetVolume" (ByVal uDeviceID As Long, ByVal dwVolume As Long) As Long
  11428.  
  11429. Declare Function waveOutGetErrorText Lib "winmm.dll" Alias "waveOutGetErrorTextA" (ByVal err As Long, ByVal lpText As String, ByVal uSize As Long) As Long
  11430.  
  11431. Declare Function waveOutOpen Lib "winmm.dll" Alias "waveOutOpen" (lphWaveOut As Long, ByVal uDeviceID As Long, lpFormat As WAVEFORMAT, ByVal dwCallback As Long, ByVal dwInstance As Long, ByVal dwFlags As Long) As Long
  11432. Declare Function waveOutClose Lib "winmm.dll" Alias "waveOutClose" (ByVal hWaveOut As Long) As Long
  11433. Declare Function waveOutPrepareHeader Lib "winmm.dll" Alias "waveOutPrepareHeader" (ByVal hWaveOut As Long, lpWaveOutHdr As WAVEHDR, ByVal uSize As Long) As Long
  11434. Declare Function waveOutUnprepareHeader Lib "winmm.dll" Alias "waveOutUnprepareHeader" (ByVal hWaveOut As Long, lpWaveOutHdr As WAVEHDR, ByVal uSize As Long) As Long
  11435. Declare Function waveOutWrite Lib "winmm.dll" Alias "waveOutWrite" (ByVal hWaveOut As Long, lpWaveOutHdr As WAVEHDR, ByVal uSize As Long) As Long
  11436. Declare Function waveOutPause Lib "winmm.dll" Alias "waveOutPause" (ByVal hWaveOut As Long) As Long
  11437. Declare Function waveOutRestart Lib "winmm.dll" Alias "waveOutRestart" (ByVal hWaveOut As Long) As Long
  11438. Declare Function waveOutReset Lib "winmm.dll" Alias "waveOutReset" (ByVal hWaveOut As Long) As Long
  11439. Declare Function waveOutBreakLoop Lib "winmm.dll" Alias "waveOutBreakLoop" (ByVal hWaveOut As Long) As Long
  11440. Declare Function waveOutGetPosition Lib "winmm.dll" Alias "waveOutGetPosition" (ByVal hWaveOut As Long, lpInfo As MMTIME, ByVal uSize As Long) As Long
  11441. Declare Function waveOutGetPitch Lib "winmm.dll" Alias "waveOutGetPitch" (ByVal hWaveOut As Long, lpdwPitch As Long) As Long
  11442. Declare Function waveOutSetPitch Lib "winmm.dll" Alias "waveOutSetPitch" (ByVal hWaveOut As Long, ByVal dwPitch As Long) As Long
  11443. Declare Function waveOutGetPlaybackRate Lib "winmm.dll" Alias "waveOutGetPlaybackRate" (ByVal hWaveOut As Long, lpdwRate As Long) As Long
  11444. Declare Function waveOutSetPlaybackRate Lib "winmm.dll" Alias "waveOutSetPlaybackRate" (ByVal hWaveOut As Long, ByVal dwRate As Long) As Long
  11445. Declare Function waveOutGetID Lib "winmm.dll" Alias "waveOutGetID" (ByVal hWaveOut As Long, lpuDeviceID As Long) As Long
  11446. Declare Function waveOutMessage Lib "winmm.dll" Alias "waveOutMessage" (ByVal hWaveOut As Long, ByVal msg As Long, ByVal dw1 As Long, ByVal dw2 As Long) As Long
  11447. Declare Function waveInGetNumDevs Lib "winmm.dll" Alias "waveInGetNumDevs" () As Long
  11448.  
  11449. Declare Function waveInGetDevCaps Lib "winmm.dll" Alias "waveInGetDevCapsA" (ByVal uDeviceID As Long, lpCaps As WAVEINCAPS, ByVal uSize As Long) As Long
  11450.  
  11451. Declare Function waveInGetErrorText Lib "winmm.dll" Alias "waveInGetErrorTextA" (ByVal err As Long, ByVal lpText As String, ByVal uSize As Long) As Long
  11452.  
  11453. Declare Function waveInOpen Lib "winmm.dll" Alias "waveInOpen" (lphWaveIn As Long, ByVal uDeviceID As Long, lpFormat As WAVEFORMAT, ByVal dwCallback As Long, ByVal dwInstance As Long, ByVal dwFlags As Long) As Long
  11454. Declare Function waveInClose Lib "winmm.dll" Alias "waveInClose" (ByVal hWaveIn As Long) As Long
  11455. Declare Function waveInPrepareHeader Lib "winmm.dll" Alias "waveInPrepareHeader" (ByVal hWaveIn As Long, lpWaveInHdr As WAVEHDR, ByVal uSize As Long) As Long
  11456. Declare Function waveInUnprepareHeader Lib "winmm.dll" Alias "waveInUnprepareHeader" (ByVal hWaveIn As Long, lpWaveInHdr As WAVEHDR, ByVal uSize As Long) As Long
  11457. Declare Function waveInAddBuffer Lib "winmm.dll" Alias "waveInAddBuffer" (ByVal hWaveIn As Long, lpWaveInHdr As WAVEHDR, ByVal uSize As Long) As Long
  11458. Declare Function waveInStart Lib "winmm.dll" Alias "waveInStart" (ByVal hWaveIn As Long) As Long
  11459. Declare Function waveInStop Lib "winmm.dll" Alias "waveInStop" (ByVal hWaveIn As Long) As Long
  11460. Declare Function waveInReset Lib "winmm.dll" Alias "waveInReset" (ByVal hWaveIn As Long) As Long
  11461. Declare Function waveInGetPosition Lib "winmm.dll" Alias "waveInGetPosition" (ByVal hWaveIn As Long, lpInfo As MMTIME, ByVal uSize As Long) As Long
  11462. Declare Function waveInGetID Lib "winmm.dll" Alias "waveInGetID" (ByVal hWaveIn As Long, lpuDeviceID As Long) As Long
  11463. Declare Function waveInMessage Lib "winmm.dll" Alias "waveInMessage" (ByVal hWaveIn As Long, ByVal msg As Long, ByVal dw1 As Long, ByVal dw2 As Long) As Long
  11464.  
  11465. '  MIDI error return values
  11466. Const MIDIERR_UNPREPARED = (MIDIERR_BASE + 0)   '  header not prepared
  11467. Const MIDIERR_STILLPLAYING = (MIDIERR_BASE + 1)   '  still something playing
  11468. Const MIDIERR_NOMAP = (MIDIERR_BASE + 2)   '  no current map
  11469. Const MIDIERR_NOTREADY = (MIDIERR_BASE + 3)   '  hardware is still busy
  11470. Const MIDIERR_NODEVICE = (MIDIERR_BASE + 4)   '  port no longer connected
  11471. Const MIDIERR_INVALIDSETUP = (MIDIERR_BASE + 5)   '  invalid setup
  11472. Const MIDIERR_LASTERROR = (MIDIERR_BASE + 5)   '  last error in range
  11473.  
  11474. '  MIDI callback messages
  11475. Const MIM_OPEN = MM_MIM_OPEN
  11476. Const MIM_CLOSE = MM_MIM_CLOSE
  11477. Const MIM_DATA = MM_MIM_DATA
  11478. Const MIM_LONGDATA = MM_MIM_LONGDATA
  11479. Const MIM_ERROR = MM_MIM_ERROR
  11480. Const MIM_LONGERROR = MM_MIM_LONGERROR
  11481. Const MOM_OPEN = MM_MOM_OPEN
  11482. Const MOM_CLOSE = MM_MOM_CLOSE
  11483. Const MOM_DONE = MM_MOM_DONE
  11484.  
  11485. '  device ID for MIDI mapper
  11486. Const MIDIMAPPER = (-1)  '  Cannot be cast to DWORD as RC complains
  11487. Const MIDI_MAPPER = -1&
  11488.  
  11489. '  flags for wFlags parm of midiOutCachePatches(), midiOutCacheDrumPatches()
  11490. Const MIDI_CACHE_ALL = 1
  11491. Const MIDI_CACHE_BESTFIT = 2
  11492. Const MIDI_CACHE_QUERY = 3
  11493. Const MIDI_UNCACHE = 4
  11494. Const MIDI_CACHE_VALID = (MIDI_CACHE_ALL Or MIDI_CACHE_BESTFIT Or MIDI_CACHE_QUERY Or MIDI_UNCACHE)  '  ;Internal
  11495.  
  11496. Type MIDIOUTCAPS
  11497.         wMid As Integer
  11498.         wPid As Integer
  11499.         vDriverVersion As Long
  11500.         szPname As String * MAXPNAMELEN
  11501.         wTechnology As Integer
  11502.         wVoices As Integer
  11503.         wNotes As Integer
  11504.         wChannelMask As Integer
  11505.         dwSupport As Long
  11506. End Type
  11507.  
  11508. '  flags for wTechnology field of MIDIOUTCAPS structure
  11509. Const MOD_MIDIPORT = 1  '  output port
  11510. Const MOD_SYNTH = 2  '  generic internal synth
  11511. Const MOD_SQSYNTH = 3  '  square wave internal synth
  11512. Const MOD_FMSYNTH = 4  '  FM internal synth
  11513. Const MOD_MAPPER = 5  '  MIDI mapper
  11514.  
  11515. '  flags for dwSupport field of MIDIOUTCAPS
  11516. Const MIDICAPS_VOLUME = &H1         '  supports volume control
  11517. Const MIDICAPS_LRVOLUME = &H2         '  separate left-right volume control
  11518. Const MIDICAPS_CACHE = &H4
  11519.  
  11520. Type MIDIINCAPS
  11521.         wMid As Integer
  11522.         wPid As Integer
  11523.         vDriverVersion As Long
  11524.         szPname As String * MAXPNAMELEN
  11525. End Type
  11526.  
  11527. Type MIDIHDR
  11528.         lpData As String
  11529.         dwBufferLength As Long
  11530.         dwBytesRecorded As Long
  11531.         dwUser As Long
  11532.         dwFlags As Long
  11533.         lpNext As Long
  11534.         Reserved As Long
  11535. End Type
  11536.  
  11537. '  flags for dwFlags field of MIDIHDR structure
  11538. Const MHDR_DONE = &H1         '  done bit
  11539. Const MHDR_PREPARED = &H2         '  set if header prepared
  11540. Const MHDR_INQUEUE = &H4         '  reserved for driver
  11541. Const MHDR_VALID = &H7         '  valid flags / ;Internal /
  11542.  
  11543. Declare Function midiOutGetDevCaps Lib "winmm.dll" Alias "midiOutGetDevCapsA" (ByVal uDeviceID As Long, lpCaps As MIDIOUTCAPS, ByVal uSize As Long) As Long
  11544.  
  11545. Declare Function midiOutGetVolume Lib "winmm.dll" Alias "midiOutGetVolume" (ByVal uDeviceID As Long, lpdwVolume As Long) As Long
  11546. Declare Function midiOutSetVolume Lib "winmm.dll" Alias "midiOutSetVolume" (ByVal uDeviceID As Long, ByVal dwVolume As Long) As Long
  11547.  
  11548. Declare Function midiOutGetErrorText Lib "winmm.dll" Alias "midiOutGetErrorTextA" (ByVal err As Long, ByVal lpText As String, ByVal uSize As Long) As Long
  11549.  
  11550. Declare Function midiOutOpen Lib "winmm.dll" Alias "midiOutOpen" (lphMidiOut As Long, ByVal uDeviceID As Long, ByVal dwCallback As Long, ByVal dwInstance As Long, ByVal dwFlags As Long) As Long
  11551. Declare Function midiOutClose Lib "winmm.dll" Alias "midiOutClose" (ByVal hMidiOut As Long) As Long
  11552. Declare Function midiOutPrepareHeader Lib "winmm.dll" Alias "midiOutPrepareHeader" (ByVal hMidiOut As Long, lpMidiOutHdr As MIDIHDR, ByVal uSize As Long) As Long
  11553. Declare Function midiOutUnprepareHeader Lib "winmm.dll" Alias "midiOutUnprepareHeader" (ByVal hMidiOut As Long, lpMidiOutHdr As MIDIHDR, ByVal uSize As Long) As Long
  11554. Declare Function midiOutShortMsg Lib "winmm.dll" Alias "midiOutShortMsg" (ByVal hMidiOut As Long, ByVal dwMsg As Long) As Long
  11555. Declare Function midiOutLongMsg Lib "winmm.dll" Alias "midiOutLongMsg" (ByVal hMidiOut As Long, lpMidiOutHdr As MIDIHDR, ByVal uSize As Long) As Long
  11556. Declare Function midiOutReset Lib "winmm.dll" Alias "midiOutReset" (ByVal hMidiOut As Long) As Long
  11557. Declare Function midiOutCachePatches Lib "winmm.dll" Alias "midiOutCachePatches" (ByVal hMidiOut As Long, ByVal uBank As Long, lpPatchArray As Long, ByVal uFlags As Long) As Long
  11558. Declare Function midiOutCacheDrumPatches Lib "winmm.dll" Alias "midiOutCacheDrumPatches" (ByVal hMidiOut As Long, ByVal uPatch As Long, lpKeyArray As Long, ByVal uFlags As Long) As Long
  11559. Declare Function midiOutGetID Lib "winmm.dll" Alias "midiOutGetID" (ByVal hMidiOut As Long, lpuDeviceID As Long) As Long
  11560. Declare Function midiOutMessage Lib "winmm.dll" Alias "midiOutMessage" (ByVal hMidiOut As Long, ByVal msg As Long, ByVal dw1 As Long, ByVal dw2 As Long) As Long
  11561. Declare Function midiInGetNumDevs Lib "winmm.dll" Alias "midiInGetNumDevs" () As Long
  11562.  
  11563. Declare Function midiInGetDevCaps Lib "winmm.dll" Alias "midiInGetDevCapsA" (ByVal uDeviceID As Long, lpCaps As MIDIINCAPS, ByVal uSize As Long) As Long
  11564.  
  11565. Declare Function midiInGetErrorText Lib "winmm.dll" Alias "midiInGetErrorTextA" (ByVal err As Long, ByVal lpText As String, ByVal uSize As Long) As Long
  11566.  
  11567. Declare Function midiInOpen Lib "winmm.dll" Alias "midiInOpen" (lphMidiIn As Long, ByVal uDeviceID As Long, ByVal dwCallback As Long, ByVal dwInstance As Long, ByVal dwFlags As Long) As Long
  11568. Declare Function midiInClose Lib "winmm.dll" Alias "midiInClose" (ByVal hMidiIn As Long) As Long
  11569. Declare Function midiInPrepareHeader Lib "winmm.dll" Alias "midiInPrepareHeader" (ByVal hMidiIn As Long, lpMidiInHdr As MIDIHDR, ByVal uSize As Long) As Long
  11570. Declare Function midiInUnprepareHeader Lib "winmm.dll" Alias "midiInUnprepareHeader" (ByVal hMidiIn As Long, lpMidiInHdr As MIDIHDR, ByVal uSize As Long) As Long
  11571. Declare Function midiInAddBuffer Lib "winmm.dll" Alias "midiInAddBuffer" (ByVal hMidiIn As Long, lpMidiInHdr As MIDIHDR, ByVal uSize As Long) As Long
  11572. Declare Function midiInStart Lib "winmm.dll" Alias "midiInStart" (ByVal hMidiIn As Long) As Long
  11573. Declare Function midiInStop Lib "winmm.dll" Alias "midiInStop" (ByVal hMidiIn As Long) As Long
  11574. Declare Function midiInReset Lib "winmm.dll" Alias "midiInReset" (ByVal hMidiIn As Long) As Long
  11575. Declare Function midiInGetID Lib "winmm.dll" Alias "midiInGetID" (ByVal hMidiIn As Long, lpuDeviceID As Long) As Long
  11576. Declare Function midiInMessage Lib "winmm.dll" Alias "midiInMessage" (ByVal hMidiIn As Long, ByVal msg As Long, ByVal dw1 As Long, ByVal dw2 As Long) As Long
  11577.  
  11578. '  device ID for aux device mapper
  11579. Const AUX_MAPPER = -1&
  11580.  
  11581. Type AUXCAPS
  11582.         wMid As Integer
  11583.         wPid As Integer
  11584.         vDriverVersion As Long
  11585.         szPname As String * MAXPNAMELEN
  11586.         wTechnology As Integer
  11587.         dwSupport As Long
  11588. End Type
  11589.  
  11590. '  flags for wTechnology field in AUXCAPS structure
  11591. Const AUXCAPS_CDAUDIO = 1  '  audio from internal CD-ROM drive
  11592. Const AUXCAPS_AUXIN = 2  '  audio from auxiliary input jacks
  11593.  
  11594. '  flags for dwSupport field in AUXCAPS structure
  11595. Const AUXCAPS_VOLUME = &H1         '  supports volume control
  11596. Const AUXCAPS_LRVOLUME = &H2         '  separate left-right volume control
  11597.  
  11598. Declare Function auxGetNumDevs Lib "winmm.dll" Alias "auxGetNumDevs" () As Long
  11599. Declare Function auxGetDevCaps Lib "winmm.dll" Alias "auxGetDevCapsA" (ByVal uDeviceID As Long, lpCaps As AUXCAPS, ByVal uSize As Long) As Long
  11600.  
  11601. Declare Function auxSetVolume Lib "winmm.dll" Alias "auxSetVolume" (ByVal uDeviceID As Long, ByVal dwVolume As Long) As Long
  11602. Declare Function auxGetVolume Lib "winmm.dll" Alias "auxGetVolume" (ByVal uDeviceID As Long, lpdwVolume As Long) As Long
  11603. Declare Function auxOutMessage Lib "winmm.dll" Alias "auxOutMessage" (ByVal uDeviceID As Long, ByVal msg As Long, ByVal dw1 As Long, ByVal dw2 As Long) As Long
  11604.  
  11605. '  timer error return values
  11606. Const TIMERR_NOERROR = (0)  '  no error
  11607. Const TIMERR_NOCANDO = (TIMERR_BASE + 1) '  request not completed
  11608. Const TIMERR_STRUCT = (TIMERR_BASE + 33) '  time struct size
  11609.  
  11610. '  flags for wFlags parameter of timeSetEvent() function
  11611. Const TIME_ONESHOT = 0  '  program timer for single event
  11612. Const TIME_PERIODIC = 1  '  program for continuous periodic event
  11613.  
  11614. Type TIMECAPS
  11615.         wPeriodMin As Long
  11616.         wPeriodMax As Long
  11617. End Type
  11618.  
  11619. Declare Function timeGetSystemTime Lib "winmm.dll" Alias "timeGetSystemTime" (lpTime As MMTIME, ByVal uSize As Long) As Long
  11620. Declare Function timeGetTime Lib "winmm.dll" Alias "timeGetTime" () As Long
  11621. Declare Function timeSetEvent Lib "winmm.dll" Alias "timeSetEvent" (ByVal uDelay As Long, ByVal uResolution As Long, ByVal lpFunction As Long, ByVal dwUser As Long, ByVal uFlags As Long) As Long
  11622. Declare Function timeKillEvent Lib "winmm.dll" Alias "timeKillEvent" (ByVal uID As Long) As Long
  11623. Declare Function timeGetDevCaps Lib "winmm.dll" Alias "timeGetDevCaps" (lpTimeCaps As TIMECAPS, ByVal uSize As Long) As Long
  11624. Declare Function timeBeginPeriod Lib "winmm.dll" Alias "timeBeginPeriod" (ByVal uPeriod As Long) As Long
  11625. Declare Function timeEndPeriod Lib "winmm.dll" Alias "timeEndPeriod" (ByVal uPeriod As Long) As Long
  11626.  
  11627. '  joystick error return values
  11628. Const JOYERR_NOERROR = (0)  '  no error
  11629. Const JOYERR_PARMS = (JOYERR_BASE + 5) '  bad parameters
  11630. Const JOYERR_NOCANDO = (JOYERR_BASE + 6) '  request not completed
  11631. Const JOYERR_UNPLUGGED = (JOYERR_BASE + 7) '  joystick is unplugged
  11632.  
  11633. '  constants used with JOYINFO structure and MM_JOY messages
  11634. Const JOY_BUTTON1 = &H1
  11635. Const JOY_BUTTON2 = &H2
  11636. Const JOY_BUTTON3 = &H4
  11637. Const JOY_BUTTON4 = &H8
  11638. Const JOY_BUTTON1CHG = &H100
  11639. Const JOY_BUTTON2CHG = &H200
  11640. Const JOY_BUTTON3CHG = &H400
  11641. Const JOY_BUTTON4CHG = &H800
  11642.  
  11643. '  joystick ID constants
  11644. Const JOYSTICKID1 = 0
  11645. Const JOYSTICKID2 = 1
  11646.  
  11647. Type JOYCAPS
  11648.         wMid As Integer
  11649.         wPid As Integer
  11650.         szPname As String * MAXPNAMELEN
  11651.         wXmin As Integer
  11652.         wXmax As Integer
  11653.         wYmin As Integer
  11654.         wYmax As Integer
  11655.         wZmin As Integer
  11656.         wZmax As Integer
  11657.         wNumButtons As Integer
  11658.         wPeriodMin As Integer
  11659.         wPeriodMax As Integer
  11660. End Type
  11661.  
  11662. Type JOYINFO
  11663.         wXpos As Long
  11664.         wYpos As Long
  11665.         wZpos As Long
  11666.         wButtons As Long
  11667. End Type
  11668.  
  11669. Declare Function joyGetDevCaps Lib "winmm.dll" Alias "joyGetDevCapsA" (ByVal id As Long, lpCaps As JOYCAPS, ByVal uSize As Long) As Long
  11670.  
  11671. Declare Function joyGetNumDevs Lib "winmm.dll" Alias "joyGetNumDev" () As Long
  11672. Declare Function joyGetThreshold Lib "winmm.dll" Alias "joyGetThreshold" (ByVal id As Long, lpuThreshold As Long) As Long
  11673. Declare Function joyReleaseCapture Lib "winmm.dll" Alias "joyReleaseCapture" (ByVal id As Long) As Long
  11674. Declare Function joySetCapture Lib "winmm.dll" Alias "joySetCapture" (ByVal hwnd As Long, ByVal uID As Long, ByVal uPeriod As Long, ByVal bChanged As Long) As Long
  11675. Declare Function joySetThreshold Lib "winmm.dll" Alias "joySetThreshold" (ByVal id As Long, ByVal uThreshold As Long) As Long
  11676.  
  11677. '  MMIO error return values
  11678. Const MMIOERR_BASE = 256
  11679. Const MMIOERR_FILENOTFOUND = (MMIOERR_BASE + 1)  '  file not found
  11680. Const MMIOERR_OUTOFMEMORY = (MMIOERR_BASE + 2)  '  out of memory
  11681. Const MMIOERR_CANNOTOPEN = (MMIOERR_BASE + 3)  '  cannot open
  11682. Const MMIOERR_CANNOTCLOSE = (MMIOERR_BASE + 4)  '  cannot close
  11683. Const MMIOERR_CANNOTREAD = (MMIOERR_BASE + 5)  '  cannot read
  11684. Const MMIOERR_CANNOTWRITE = (MMIOERR_BASE + 6) '  cannot write
  11685. Const MMIOERR_CANNOTSEEK = (MMIOERR_BASE + 7)  '  cannot seek
  11686. Const MMIOERR_CANNOTEXPAND = (MMIOERR_BASE + 8)  '  cannot expand file
  11687. Const MMIOERR_CHUNKNOTFOUND = (MMIOERR_BASE + 9)  '  chunk not found
  11688. Const MMIOERR_UNBUFFERED = (MMIOERR_BASE + 10) '  file is unbuffered
  11689.  
  11690. '  MMIO constants
  11691. Const CFSEPCHAR = "+"  '  compound file name separator char.
  11692.  
  11693. Type MMIOINFO
  11694.         dwFlags As Long
  11695.         fccIOProc As Long
  11696.         pIOProc As Long
  11697.         wErrorRet As Long
  11698.         htask As Long
  11699.         cchBuffer As Long
  11700.         pchBuffer As String
  11701.         pchNext As String
  11702.         pchEndRead As String
  11703.         pchEndWrite As String
  11704.         lBufOffset As Long
  11705.         lDiskOffset As Long
  11706.         adwInfo(4) As Long
  11707.         dwReserved1 As Long
  11708.         dwReserved2 As Long
  11709.         hmmio As Long
  11710. End Type
  11711.  
  11712. Const MMIO_RWMODE = &H3         '  mask to get bits used for opening
  11713.                                         '  file for reading/writing/both
  11714. Const MMIO_SHAREMODE = &H70        '  file sharing mode number
  11715.  
  11716. '  constants for dwFlags field of MMIOINFO
  11717. Const MMIO_CREATE = &H1000      '  create new file (or truncate file)
  11718. Const MMIO_PARSE = &H100       '  parse new file returning path
  11719. Const MMIO_DELETE = &H200       '  create new file (or truncate file)
  11720. Const MMIO_EXIST = &H4000      '  checks for existence of file
  11721. Const MMIO_ALLOCBUF = &H10000     '  mmioOpen() should allocate a buffer
  11722. Const MMIO_GETTEMP = &H20000     '  mmioOpen() should retrieve temp name
  11723.  
  11724. Const MMIO_DIRTY = &H10000000  '  I/O buffer is dirty
  11725. '  MMIO_DIRTY is also used in the <dwFlags> field of MMCKINFO structure
  11726.  
  11727. Const MMIO_OPEN_VALID = &H3FFFF     '  valid flags for mmioOpen / ;Internal /
  11728.  
  11729. '  read/write mode numbers (bit field MMIO_RWMODE)
  11730. Const MMIO_READ = &H0         '  open file for reading only
  11731. Const MMIO_WRITE = &H1         '  open file for writing only
  11732. Const MMIO_READWRITE = &H2         '  open file for reading and writing
  11733.  
  11734. '  share mode numbers (bit field MMIO_SHAREMODE)
  11735. Const MMIO_COMPAT = &H0         '  compatibility mode
  11736. Const MMIO_EXCLUSIVE = &H10        '  exclusive-access mode
  11737. Const MMIO_DENYWRITE = &H20        '  deny writing to other processes
  11738. Const MMIO_DENYREAD = &H30        '  deny reading to other processes
  11739. Const MMIO_DENYNONE = &H40        '  deny nothing to other processes
  11740.  
  11741. '  flags for other functions
  11742. Const MMIO_FHOPEN = &H10    '  mmioClose(): keep file handle open
  11743. Const MMIO_EMPTYBUF = &H10    '  mmioFlush(): empty the I/O buffer
  11744. Const MMIO_TOUPPER = &H10    '  mmioStringToFOURCC(): cvt. to u-case
  11745. Const MMIO_INSTALLPROC = &H10000     '  mmioInstallIOProc(): install MMIOProc
  11746. Const MMIO_PUBLICPROC = &H10000000  '  mmioInstallIOProc: install Globally
  11747. Const MMIO_UNICODEPROC = &H1000000   '  mmioInstallIOProc(): Unicode MMIOProc
  11748. Const MMIO_REMOVEPROC = &H20000     '  mmioInstallIOProc(): remove MMIOProc
  11749. Const MMIO_FINDPROC = &H40000     '  mmioInstallIOProc(): find an MMIOProc
  11750. Const MMIO_FINDCHUNK = &H10    '  mmioDescend(): find a chunk by ID
  11751. Const MMIO_FINDRIFF = &H20    '  mmioDescend(): find a LIST chunk
  11752. Const MMIO_FINDLIST = &H40    '  mmioDescend(): find a RIFF chunk
  11753. Const MMIO_CREATERIFF = &H20    '  mmioCreateChunk(): make a LIST chunk
  11754. Const MMIO_CREATELIST = &H40    '  mmioCreateChunk(): make a RIFF chunk
  11755.  
  11756. Const MMIO_VALIDPROC = &H11070000  '  valid for mmioInstallIOProc / ;Internal /
  11757.  
  11758. '  message numbers for MMIOPROC I/O procedure functions
  11759. Const MMIOM_READ = MMIO_READ  '  read (must equal MMIO_READ!)
  11760. Const MMIOM_WRITE = MMIO_WRITE  '  write (must equal MMIO_WRITE!)
  11761. Const MMIOM_SEEK = 2  '  seek to a new position in file
  11762. Const MMIOM_OPEN = 3  '  open file
  11763. Const MMIOM_CLOSE = 4  '  close file
  11764. Const MMIOM_WRITEFLUSH = 5  '  write and flush
  11765. Const MMIOM_RENAME = 6  '  rename specified file
  11766. Const MMIOM_USER = &H8000  '  beginning of user-defined messages
  11767.  
  11768. '  flags for mmioSeek()
  11769. Const SEEK_SET = 0  '  seek to an absolute position
  11770. Const SEEK_CUR = 1  '  seek relative to current position
  11771. Const SEEK_END = 2  '  seek relative to end of file
  11772.  
  11773. '  other constants
  11774. Const MMIO_DEFAULTBUFFER = 8192  '  default buffer size
  11775.  
  11776. Type MMCKINFO
  11777.     ckid As Long
  11778.     ckSize As Long
  11779.     fccType As Long
  11780.     dwDataOffset As Long
  11781.     dwFlags As Long
  11782. End Type
  11783.  
  11784. Declare Function mmioStringToFOURCC Lib "winmm.dll" Alias "mmioStringToFOURCCA" (ByVal sz As String, ByVal uFlags As Long) As Long
  11785.  
  11786. Declare Function mmioOpen Lib "winmm.dll" Alias "mmioOpenA" (ByVal szFileName As String, lpmmioinfo As MMIOINFO, ByVal dwOpenFlags As Long) As Long
  11787.  
  11788. Declare Function mmioRename Lib "winmm.dll" Alias "mmioRenameA" (ByVal szFileName As String, ByVal SzNewFileName As String, lpmmioinfo As MMIOINFO, ByVal dwRenameFlags As Long) As Long
  11789.  
  11790. Declare Function mmioClose Lib "winmm.dll" Alias "mmioClose" (ByVal hmmio As Long, ByVal uFlags As Long) As Long
  11791. Declare Function mmioRead Lib "winmm.dll" Alias "mmioRead" (ByVal hmmio As Long, ByVal pch As String, ByVal cch As Long) As Long
  11792. Declare Function mmioWrite Lib "winmm.dll" Alias "mmioWrite" (ByVal hmmio As Long, ByVal pch As String, ByVal cch As Long) As Long
  11793. Declare Function mmioSeek Lib "winmm.dll" Alias "mmioSeek" (ByVal hmmio As Long, ByVal lOffset As Long, ByVal iOrigin As Long) As Long
  11794. Declare Function mmioGetInfo Lib "winmm.dll" Alias "mmioGetInfo" (ByVal hmmio As Long, lpmmioinfo As MMIOINFO, ByVal uFlags As Long) As Long
  11795. Declare Function mmioSetInfo Lib "winmm.dll" Alias "mmioSetInfo" (ByVal hmmio As Long, lpmmioinfo As MMIOINFO, ByVal uFlags As Long) As Long
  11796. Declare Function mmioSetBuffer Lib "winmm.dll" Alias "mmioSetBuffer" (ByVal hmmio As Long, ByVal pchBuffer As String, ByVal cchBuffer As Long, ByVal uFlags As Long) As Long
  11797. Declare Function mmioFlush Lib "winmm.dll" Alias "mmioFlush" (ByVal hmmio As Long, ByVal uFlags As Long) As Long
  11798. Declare Function mmioAdvance Lib "winmm.dll" Alias "mmioAdvance" (ByVal hmmio As Long, lpmmioinfo As MMIOINFO, ByVal uFlags As Long) As Long
  11799. Declare Function mmioSendMessage Lib "winmm.dll" Alias "mmioSendMessage" (ByVal hmmio As Long, ByVal uMsg As Long, ByVal lParam1 As Long, ByVal lParam2 As Long) As Long
  11800.  
  11801. Declare Function mmioDescend Lib "winmm.dll" Alias "mmioDescend" (ByVal hmmio As Long, lpck As MMCKINFO, lpckParent As MMCKINFO, ByVal uFlags As Long) As Long
  11802. Declare Function mmioAscend Lib "winmm.dll" Alias "mmioAscend" (ByVal hmmio As Long, lpck As MMCKINFO, ByVal uFlags As Long) As Long
  11803. Declare Function mmioCreateChunk Lib "winmm.dll" Alias "mmioCreateChunk" (ByVal hmmio As Long, lpck As MMCKINFO, ByVal uFlags As Long) As Long
  11804.  
  11805. ' MCI functions
  11806.  
  11807. Declare Function mciSendCommand Lib "winmm.dll" Alias "mciSendCommandA" (ByVal wDeviceID As Long, ByVal uMessage As Long, ByVal dwParam1 As Long, ByVal dwParam2 As Any) As Long
  11808.  
  11809. Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long
  11810.  
  11811. Declare Function mciGetCreatorTask Lib "winmm.dll" Alias "mciGetCreatorTask" (ByVal wDeviceID As Long) As Long
  11812.  
  11813. Declare Function mciGetDeviceID Lib "winmm.dll" Alias "mciGetDeviceIDA" (ByVal lpstrName As String) As Long
  11814.  
  11815. Declare Function mciGetDeviceIDFromElementID Lib "winmm.dll" Alias "mciGetDeviceIDFromElementIDA" (ByVal dwElementID As Long, ByVal lpstrType As String) As Long
  11816.  
  11817. Declare Function mciGetErrorString Lib "winmm.dll" Alias "mciGetErrorStringA" (ByVal dwError As Long, ByVal lpstrBuffer As String, ByVal uLength As Long) As Long
  11818.  
  11819. Declare Function mciExecute Lib "winmm.dll" Alias "mciExecute" (ByVal lpstrCommand As String) As Long
  11820.  
  11821. '   MCI error return values
  11822. Const MCIERR_INVALID_DEVICE_ID = (MCIERR_BASE + 1)
  11823. Const MCIERR_UNRECOGNIZED_KEYWORD = (MCIERR_BASE + 3)
  11824. Const MCIERR_UNRECOGNIZED_COMMAND = (MCIERR_BASE + 5)
  11825. Const MCIERR_HARDWARE = (MCIERR_BASE + 6)
  11826. Const MCIERR_INVALID_DEVICE_NAME = (MCIERR_BASE + 7)
  11827. Const MCIERR_OUT_OF_MEMORY = (MCIERR_BASE + 8)
  11828. Const MCIERR_DEVICE_OPEN = (MCIERR_BASE + 9)
  11829. Const MCIERR_CANNOT_LOAD_DRIVER = (MCIERR_BASE + 10)
  11830. Const MCIERR_MISSING_COMMAND_STRING = (MCIERR_BASE + 11)
  11831. Const MCIERR_PARAM_OVERFLOW = (MCIERR_BASE + 12)
  11832. Const MCIERR_MISSING_STRING_ARGUMENT = (MCIERR_BASE + 13)
  11833. Const MCIERR_BAD_INTEGER = (MCIERR_BASE + 14)
  11834. Const MCIERR_PARSER_INTERNAL = (MCIERR_BASE + 15)
  11835. Const MCIERR_DRIVER_INTERNAL = (MCIERR_BASE + 16)
  11836. Const MCIERR_MISSING_PARAMETER = (MCIERR_BASE + 17)
  11837. Const MCIERR_UNSUPPORTED_FUNCTION = (MCIERR_BASE + 18)
  11838. Const MCIERR_FILE_NOT_FOUND = (MCIERR_BASE + 19)
  11839. Const MCIERR_DEVICE_NOT_READY = (MCIERR_BASE + 20)
  11840. Const MCIERR_INTERNAL = (MCIERR_BASE + 21)
  11841. Const MCIERR_DRIVER = (MCIERR_BASE + 22)
  11842. Const MCIERR_CANNOT_USE_ALL = (MCIERR_BASE + 23)
  11843. Const MCIERR_MULTIPLE = (MCIERR_BASE + 24)
  11844. Const MCIERR_EXTENSION_NOT_FOUND = (MCIERR_BASE + 25)
  11845. Const MCIERR_OUTOFRANGE = (MCIERR_BASE + 26)
  11846. Const MCIERR_FLAGS_NOT_COMPATIBLE = (MCIERR_BASE + 28)
  11847. Const MCIERR_FILE_NOT_SAVED = (MCIERR_BASE + 30)
  11848. Const MCIERR_DEVICE_TYPE_REQUIRED = (MCIERR_BASE + 31)
  11849. Const MCIERR_DEVICE_LOCKED = (MCIERR_BASE + 32)
  11850. Const MCIERR_DUPLICATE_ALIAS = (MCIERR_BASE + 33)
  11851. Const MCIERR_BAD_CONSTANT = (MCIERR_BASE + 34)
  11852. Const MCIERR_MUST_USE_SHAREABLE = (MCIERR_BASE + 35)
  11853. Const MCIERR_MISSING_DEVICE_NAME = (MCIERR_BASE + 36)
  11854. Const MCIERR_BAD_TIME_FORMAT = (MCIERR_BASE + 37)
  11855. Const MCIERR_NO_CLOSING_QUOTE = (MCIERR_BASE + 38)
  11856. Const MCIERR_DUPLICATE_FLAGS = (MCIERR_BASE + 39)
  11857. Const MCIERR_INVALID_FILE = (MCIERR_BASE + 40)
  11858. Const MCIERR_NULL_PARAMETER_BLOCK = (MCIERR_BASE + 41)
  11859. Const MCIERR_UNNAMED_RESOURCE = (MCIERR_BASE + 42)
  11860. Const MCIERR_NEW_REQUIRES_ALIAS = (MCIERR_BASE + 43)
  11861. Const MCIERR_NOTIFY_ON_AUTO_OPEN = (MCIERR_BASE + 44)
  11862. Const MCIERR_NO_ELEMENT_ALLOWED = (MCIERR_BASE + 45)
  11863. Const MCIERR_NONAPPLICABLE_FUNCTION = (MCIERR_BASE + 46)
  11864. Const MCIERR_ILLEGAL_FOR_AUTO_OPEN = (MCIERR_BASE + 47)
  11865. Const MCIERR_FILENAME_REQUIRED = (MCIERR_BASE + 48)
  11866. Const MCIERR_EXTRA_CHARACTERS = (MCIERR_BASE + 49)
  11867. Const MCIERR_DEVICE_NOT_INSTALLED = (MCIERR_BASE + 50)
  11868. Const MCIERR_GET_CD = (MCIERR_BASE + 51)
  11869. Const MCIERR_SET_CD = (MCIERR_BASE + 52)
  11870. Const MCIERR_SET_DRIVE = (MCIERR_BASE + 53)
  11871. Const MCIERR_DEVICE_LENGTH = (MCIERR_BASE + 54)
  11872. Const MCIERR_DEVICE_ORD_LENGTH = (MCIERR_BASE + 55)
  11873. Const MCIERR_NO_INTEGER = (MCIERR_BASE + 56)
  11874.  
  11875. Const MCIERR_WAVE_OUTPUTSINUSE = (MCIERR_BASE + 64)
  11876. Const MCIERR_WAVE_SETOUTPUTINUSE = (MCIERR_BASE + 65)
  11877. Const MCIERR_WAVE_INPUTSINUSE = (MCIERR_BASE + 66)
  11878. Const MCIERR_WAVE_SETINPUTINUSE = (MCIERR_BASE + 67)
  11879. Const MCIERR_WAVE_OUTPUTUNSPECIFIED = (MCIERR_BASE + 68)
  11880. Const MCIERR_WAVE_INPUTUNSPECIFIED = (MCIERR_BASE + 69)
  11881. Const MCIERR_WAVE_OUTPUTSUNSUITABLE = (MCIERR_BASE + 70)
  11882. Const MCIERR_WAVE_SETOUTPUTUNSUITABLE = (MCIERR_BASE + 71)
  11883. Const MCIERR_WAVE_INPUTSUNSUITABLE = (MCIERR_BASE + 72)
  11884. Const MCIERR_WAVE_SETINPUTUNSUITABLE = (MCIERR_BASE + 73)
  11885.  
  11886. Const MCIERR_SEQ_DIV_INCOMPATIBLE = (MCIERR_BASE + 80)
  11887. Const MCIERR_SEQ_PORT_INUSE = (MCIERR_BASE + 81)
  11888. Const MCIERR_SEQ_PORT_NONEXISTENT = (MCIERR_BASE + 82)
  11889. Const MCIERR_SEQ_PORT_MAPNODEVICE = (MCIERR_BASE + 83)
  11890. Const MCIERR_SEQ_PORT_MISCERROR = (MCIERR_BASE + 84)
  11891. Const MCIERR_SEQ_TIMER = (MCIERR_BASE + 85)
  11892. Const MCIERR_SEQ_PORTUNSPECIFIED = (MCIERR_BASE + 86)
  11893. Const MCIERR_SEQ_NOMIDIPRESENT = (MCIERR_BASE + 87)
  11894.  
  11895. Const MCIERR_NO_WINDOW = (MCIERR_BASE + 90)
  11896. Const MCIERR_CREATEWINDOW = (MCIERR_BASE + 91)
  11897. Const MCIERR_FILE_READ = (MCIERR_BASE + 92)
  11898. Const MCIERR_FILE_WRITE = (MCIERR_BASE + 93)
  11899.  
  11900. '  All custom device driver errors must be >= this value
  11901. Const MCIERR_CUSTOM_DRIVER_BASE = (MCIERR_BASE + 256)
  11902.  
  11903. '  Message numbers must be in the range between MCI_FIRST and MCI_LAST
  11904.  
  11905. Const MCI_FIRST = &H800
  11906. '  Messages 0x801 and 0x802 are reserved
  11907. Const MCI_OPEN = &H803
  11908. Const MCI_CLOSE = &H804
  11909. Const MCI_ESCAPE = &H805
  11910. Const MCI_PLAY = &H806
  11911. Const MCI_SEEK = &H807
  11912. Const MCI_STOP = &H808
  11913. Const MCI_PAUSE = &H809
  11914. Const MCI_INFO = &H80A
  11915. Const MCI_GETDEVCAPS = &H80B
  11916. Const MCI_SPIN = &H80C
  11917. Const MCI_SET = &H80D
  11918. Const MCI_STEP = &H80E
  11919. Const MCI_RECORD = &H80F
  11920. Const MCI_SYSINFO = &H810
  11921. Const MCI_BREAK = &H811
  11922. Const MCI_SOUND = &H812
  11923. Const MCI_SAVE = &H813
  11924. Const MCI_STATUS = &H814
  11925.  
  11926. Const MCI_CUE = &H830
  11927.  
  11928. Const MCI_REALIZE = &H840
  11929. Const MCI_WINDOW = &H841
  11930. Const MCI_PUT = &H842
  11931. Const MCI_WHERE = &H843
  11932. Const MCI_FREEZE = &H844
  11933. Const MCI_UNFREEZE = &H845
  11934.  
  11935. Const MCI_LOAD = &H850
  11936. Const MCI_CUT = &H851
  11937. Const MCI_COPY = &H852
  11938. Const MCI_PASTE = &H853
  11939. Const MCI_UPDATE = &H854
  11940. Const MCI_RESUME = &H855
  11941. Const MCI_DELETE = &H856
  11942.  
  11943. Const MCI_LAST = &HFFF
  11944.  
  11945. '  the next 0x400 message ID's are reserved for custom drivers
  11946. '  all custom MCI command messages must be >= than this value
  11947. Const MCI_USER_MESSAGES = (&H400 + MCI_FIRST)
  11948. Const MCI_ALL_DEVICE_ID =  - 1 '  Matches all MCI devices
  11949.  
  11950. '  constants for predefined MCI device types
  11951. Const MCI_DEVTYPE_VCR = 513
  11952. Const MCI_DEVTYPE_VIDEODISC = 514
  11953. Const MCI_DEVTYPE_OVERLAY = 515
  11954. Const MCI_DEVTYPE_CD_AUDIO = 516
  11955. Const MCI_DEVTYPE_DAT = 517
  11956. Const MCI_DEVTYPE_SCANNER = 518
  11957. Const MCI_DEVTYPE_ANIMATION = 519
  11958. Const MCI_DEVTYPE_DIGITAL_VIDEO = 520
  11959. Const MCI_DEVTYPE_OTHER = 521
  11960. Const MCI_DEVTYPE_WAVEFORM_AUDIO = 522
  11961. Const MCI_DEVTYPE_SEQUENCER = 523
  11962.  
  11963. Const MCI_DEVTYPE_FIRST = MCI_DEVTYPE_VCR
  11964. Const MCI_DEVTYPE_LAST = MCI_DEVTYPE_SEQUENCER
  11965.  
  11966. Const MCI_DEVTYPE_FIRST_USER = &H1000
  11967.  
  11968. '  return values for 'status mode' command
  11969. Const MCI_MODE_NOT_READY = (MCI_STRING_OFFSET + 12)
  11970. Const MCI_MODE_STOP = (MCI_STRING_OFFSET + 13)
  11971. Const MCI_MODE_PLAY = (MCI_STRING_OFFSET + 14)
  11972. Const MCI_MODE_RECORD = (MCI_STRING_OFFSET + 15)
  11973. Const MCI_MODE_SEEK = (MCI_STRING_OFFSET + 16)
  11974. Const MCI_MODE_PAUSE = (MCI_STRING_OFFSET + 17)
  11975. Const MCI_MODE_OPEN = (MCI_STRING_OFFSET + 18)
  11976.  
  11977. '  constants used in 'set time format' and 'status time format' commands
  11978. Const MCI_FORMAT_MILLISECONDS = 0
  11979. Const MCI_FORMAT_HMS = 1
  11980. Const MCI_FORMAT_MSF = 2
  11981. Const MCI_FORMAT_FRAMES = 3
  11982. Const MCI_FORMAT_SMPTE_24 = 4
  11983. Const MCI_FORMAT_SMPTE_25 = 5
  11984. Const MCI_FORMAT_SMPTE_30 = 6
  11985. Const MCI_FORMAT_SMPTE_30DROP = 7
  11986. Const MCI_FORMAT_BYTES = 8
  11987. Const MCI_FORMAT_SAMPLES = 9
  11988. Const MCI_FORMAT_TMSF = 10
  11989.  
  11990. '  Flags for wParam of the MM_MCINOTIFY message
  11991. Const MCI_NOTIFY_SUCCESSFUL = &H1
  11992. Const MCI_NOTIFY_SUPERSEDED = &H2
  11993. Const MCI_NOTIFY_ABORTED = &H4
  11994. Const MCI_NOTIFY_FAILURE = &H8
  11995.  
  11996. '  common flags for dwFlags parameter of MCI command messages
  11997. Const MCI_NOTIFY = &H1&
  11998. Const MCI_WAIT = &H2&
  11999. Const MCI_FROM = &H4&
  12000. Const MCI_TO = &H8&
  12001. Const MCI_TRACK = &H10&
  12002.  
  12003. '  flags for dwFlags parameter of MCI_OPEN command message
  12004. Const MCI_OPEN_SHAREABLE = &H100&
  12005. Const MCI_OPEN_ELEMENT = &H200&
  12006. Const MCI_OPEN_ALIAS = &H400&
  12007. Const MCI_OPEN_ELEMENT_ID = &H800&
  12008. Const MCI_OPEN_TYPE_ID = &H1000&
  12009. Const MCI_OPEN_TYPE = &H2000&
  12010.  
  12011. '  flags for dwFlags parameter of MCI_SEEK command message
  12012. Const MCI_SEEK_TO_START = &H100&
  12013. Const MCI_SEEK_TO_END = &H200&
  12014.  
  12015. '  flags for dwFlags parameter of MCI_STATUS command message
  12016. Const MCI_STATUS_ITEM = &H100&
  12017. Const MCI_STATUS_START = &H200&
  12018.  
  12019. '  flags for dwItem field of the MCI_STATUS_PARMS parameter block
  12020. Const MCI_STATUS_LENGTH = &H1&
  12021. Const MCI_STATUS_POSITION = &H2&
  12022. Const MCI_STATUS_NUMBER_OF_TRACKS = &H3&
  12023. Const MCI_STATUS_MODE = &H4&
  12024. Const MCI_STATUS_MEDIA_PRESENT = &H5&
  12025. Const MCI_STATUS_TIME_FORMAT = &H6&
  12026. Const MCI_STATUS_READY = &H7&
  12027. Const MCI_STATUS_CURRENT_TRACK = &H8&
  12028.  
  12029. '  flags for dwFlags parameter of MCI_INFO command message
  12030. Const MCI_INFO_PRODUCT = &H100&
  12031. Const MCI_INFO_FILE = &H200&
  12032.  
  12033. '  flags for dwFlags parameter of MCI_GETDEVCAPS command message
  12034. Const MCI_GETDEVCAPS_ITEM = &H100&
  12035.  
  12036. '  flags for dwItem field of the MCI_GETDEVCAPS_PARMS parameter block
  12037. Const MCI_GETDEVCAPS_CAN_RECORD = &H1&
  12038. Const MCI_GETDEVCAPS_HAS_AUDIO = &H2&
  12039. Const MCI_GETDEVCAPS_HAS_VIDEO = &H3&
  12040. Const MCI_GETDEVCAPS_DEVICE_TYPE = &H4&
  12041. Const MCI_GETDEVCAPS_USES_FILES = &H5&
  12042. Const MCI_GETDEVCAPS_COMPOUND_DEVICE = &H6&
  12043. Const MCI_GETDEVCAPS_CAN_EJECT = &H7&
  12044. Const MCI_GETDEVCAPS_CAN_PLAY = &H8&
  12045. Const MCI_GETDEVCAPS_CAN_SAVE = &H9&
  12046.  
  12047. '  flags for dwFlags parameter of MCI_SYSINFO command message
  12048. Const MCI_SYSINFO_QUANTITY = &H100&
  12049. Const MCI_SYSINFO_OPEN = &H200&
  12050. Const MCI_SYSINFO_NAME = &H400&
  12051. Const MCI_SYSINFO_INSTALLNAME = &H800&
  12052.  
  12053. '  flags for dwFlags parameter of MCI_SET command message
  12054. Const MCI_SET_DOOR_OPEN = &H100&
  12055. Const MCI_SET_DOOR_CLOSED = &H200&
  12056. Const MCI_SET_TIME_FORMAT = &H400&
  12057. Const MCI_SET_AUDIO = &H800&
  12058. Const MCI_SET_VIDEO = &H1000&
  12059. Const MCI_SET_ON = &H2000&
  12060. Const MCI_SET_OFF = &H4000&
  12061.  
  12062. '  flags for dwAudio field of MCI_SET_PARMS or MCI_SEQ_SET_PARMS
  12063. Const MCI_SET_AUDIO_ALL = &H4001&
  12064. Const MCI_SET_AUDIO_LEFT = &H4002&
  12065. Const MCI_SET_AUDIO_RIGHT = &H4003&
  12066.  
  12067. '  flags for dwFlags parameter of MCI_BREAK command message
  12068. Const MCI_BREAK_KEY = &H100&
  12069. Const MCI_BREAK_HWND = &H200&
  12070. Const MCI_BREAK_OFF = &H400&
  12071.  
  12072. '  flags for dwFlags parameter of MCI_RECORD command message
  12073. Const MCI_RECORD_INSERT = &H100&
  12074. Const MCI_RECORD_OVERWRITE = &H200&
  12075.  
  12076. '  flags for dwFlags parameter of MCI_SOUND command message
  12077. Const MCI_SOUND_NAME = &H100&
  12078.  
  12079. '  flags for dwFlags parameter of MCI_SAVE command message
  12080. Const MCI_SAVE_FILE = &H100&
  12081.  
  12082. '  flags for dwFlags parameter of MCI_LOAD command message
  12083. Const MCI_LOAD_FILE = &H100&
  12084.  
  12085. Type MCI_GENERIC_PARMS
  12086.         dwCallback As Long
  12087. End Type
  12088.  
  12089. Type MCI_OPEN_PARMS
  12090.         dwCallback As Long
  12091.         wDeviceID As Long
  12092.         lpstrDeviceType As String
  12093.         lpstrElementName As String
  12094.         lpstrAlias As String
  12095. End Type
  12096.  
  12097. Type MCI_PLAY_PARMS
  12098.         dwCallback As Long
  12099.         dwFrom As Long
  12100.         dwTo As Long
  12101. End Type
  12102.  
  12103. Type MCI_SEEK_PARMS
  12104.         dwCallback As Long
  12105.         dwTo As Long
  12106. End Type
  12107.  
  12108. Type MCI_STATUS_PARMS
  12109.         dwCallback As Long
  12110.         dwReturn As Long
  12111.         dwItem As Long
  12112.         dwTrack As Integer
  12113. End Type
  12114.  
  12115. Type MCI_INFO_PARMS
  12116.         dwCallback As Long
  12117.         lpstrReturn As String
  12118.         dwRetSize As Long
  12119. End Type
  12120.  
  12121. Type MCI_GETDEVCAPS_PARMS
  12122.         dwCallback As Long
  12123.         dwReturn As Long
  12124.         dwIten As Long
  12125. End Type
  12126.  
  12127. Type MCI_SYSINFO_PARMS
  12128.         dwCallback As Long
  12129.         lpstrReturn As String
  12130.         dwRetSize As Long
  12131.         dwNumber As Long
  12132.         wDeviceType As Long
  12133. End Type
  12134.  
  12135. Type MCI_SET_PARMS
  12136.         dwCallback As Long
  12137.         dwTimeFormat As Long
  12138.         dwAudio As Long
  12139. End Type
  12140.  
  12141. Type MCI_BREAK_PARMS
  12142.         dwCallback As Long
  12143.         nVirtKey As Long
  12144.         hwndBreak As Long
  12145. End Type
  12146.  
  12147. Type MCI_SOUND_PARMS
  12148.         dwCallback As Long
  12149.         lpstrSoundName As String
  12150. End Type
  12151.  
  12152. Type MCI_SAVE_PARMS
  12153.         dwCallback As Long
  12154.         lpFileName As String
  12155. End Type
  12156.  
  12157. Type MCI_LOAD_PARMS
  12158.         dwCallback As Long
  12159.         lpFileName As String
  12160. End Type
  12161.  
  12162. Type MCI_RECORD_PARMS
  12163.         dwCallback As Long
  12164.         dwFrom As Long
  12165.         dwTo As Long
  12166. End Type
  12167.  
  12168. Const MCI_VD_MODE_PARK = (MCI_VD_OFFSET + 1)
  12169.  
  12170. '  return ID's for videodisc MCI_GETDEVCAPS command
  12171.  
  12172. '  flag for dwReturn field of MCI_STATUS_PARMS
  12173. '  MCI_STATUS command, (dwItem == MCI_VD_STATUS_MEDIA_TYPE)
  12174. Const MCI_VD_MEDIA_CLV = (MCI_VD_OFFSET + 2)
  12175. Const MCI_VD_MEDIA_CAV = (MCI_VD_OFFSET + 3)
  12176. Const MCI_VD_MEDIA_OTHER = (MCI_VD_OFFSET + 4)
  12177.  
  12178. Const MCI_VD_FORMAT_TRACK = &H4001
  12179.  
  12180. '  flags for dwFlags parameter of MCI_PLAY command message
  12181. Const MCI_VD_PLAY_REVERSE = &H10000
  12182. Const MCI_VD_PLAY_FAST = &H20000
  12183. Const MCI_VD_PLAY_SPEED = &H40000
  12184. Const MCI_VD_PLAY_SCAN = &H80000
  12185. Const MCI_VD_PLAY_SLOW = &H100000
  12186.  
  12187. '  flag for dwFlags parameter of MCI_SEEK command message
  12188. Const MCI_VD_SEEK_REVERSE = &H10000
  12189.  
  12190. '  flags for dwItem field of MCI_STATUS_PARMS parameter block
  12191. Const MCI_VD_STATUS_SPEED = &H4002&
  12192. Const MCI_VD_STATUS_FORWARD = &H4003&
  12193. Const MCI_VD_STATUS_MEDIA_TYPE = &H4004&
  12194. Const MCI_VD_STATUS_SIDE = &H4005&
  12195. Const MCI_VD_STATUS_DISC_SIZE = &H4006&
  12196.  
  12197. '  flags for dwFlags parameter of MCI_GETDEVCAPS command message
  12198. Const MCI_VD_GETDEVCAPS_CLV = &H10000
  12199. Const MCI_VD_GETDEVCAPS_CAV = &H20000
  12200.  
  12201. Const MCI_VD_SPIN_UP = &H10000
  12202. Const MCI_VD_SPIN_DOWN = &H20000
  12203.  
  12204. '  flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block
  12205. Const MCI_VD_GETDEVCAPS_CAN_REVERSE = &H4002&
  12206. Const MCI_VD_GETDEVCAPS_FAST_RATE = &H4003&
  12207. Const MCI_VD_GETDEVCAPS_SLOW_RATE = &H4004&
  12208. Const MCI_VD_GETDEVCAPS_NORMAL_RATE = &H4005&
  12209.  
  12210. '  flags for the dwFlags parameter of MCI_STEP command message
  12211. Const MCI_VD_STEP_FRAMES = &H10000
  12212. Const MCI_VD_STEP_REVERSE = &H20000
  12213.  
  12214. '  flag for the MCI_ESCAPE command message
  12215. Const MCI_VD_ESCAPE_STRING = &H100&
  12216.  
  12217. Type MCI_VD_PLAY_PARMS
  12218.         dwCallback As Long
  12219.         dwFrom As Long
  12220.         dwTo As Long
  12221.         dwSpeed As Long
  12222. End Type
  12223.  
  12224. Type MCI_VD_STEP_PARMS
  12225.         dwCallback As Long
  12226.         dwFrames As Long
  12227. End Type
  12228.  
  12229. Type MCI_VD_ESCAPE_PARMS
  12230.         dwCallback As Long
  12231.         lpstrCommand As String
  12232. End Type
  12233.  
  12234. Const MCI_WAVE_PCM = (MCI_WAVE_OFFSET + 0)
  12235. Const MCI_WAVE_MAPPER = (MCI_WAVE_OFFSET + 1)
  12236.  
  12237. '  flags for the dwFlags parameter of MCI_OPEN command message
  12238. Const MCI_WAVE_OPEN_BUFFER = &H10000
  12239.  
  12240. '  flags for the dwFlags parameter of MCI_SET command message
  12241. Const MCI_WAVE_SET_FORMATTAG = &H10000
  12242. Const MCI_WAVE_SET_CHANNELS = &H20000
  12243. Const MCI_WAVE_SET_SAMPLESPERSEC = &H40000
  12244. Const MCI_WAVE_SET_AVGBYTESPERSEC = &H80000
  12245. Const MCI_WAVE_SET_BLOCKALIGN = &H100000
  12246. Const MCI_WAVE_SET_BITSPERSAMPLE = &H200000
  12247.  
  12248. '  flags for the dwFlags parameter of MCI_STATUS, MCI_SET command messages
  12249. Const MCI_WAVE_INPUT = &H400000
  12250. Const MCI_WAVE_OUTPUT = &H800000
  12251.  
  12252. '  flags for the dwItem field of MCI_STATUS_PARMS parameter block
  12253. Const MCI_WAVE_STATUS_FORMATTAG = &H4001&
  12254. Const MCI_WAVE_STATUS_CHANNELS = &H4002&
  12255. Const MCI_WAVE_STATUS_SAMPLESPERSEC = &H4003&
  12256. Const MCI_WAVE_STATUS_AVGBYTESPERSEC = &H4004&
  12257. Const MCI_WAVE_STATUS_BLOCKALIGN = &H4005&
  12258. Const MCI_WAVE_STATUS_BITSPERSAMPLE = &H4006&
  12259. Const MCI_WAVE_STATUS_LEVEL = &H4007&
  12260.  
  12261. '  flags for the dwFlags parameter of MCI_SET command message
  12262. Const MCI_WAVE_SET_ANYINPUT = &H4000000
  12263. Const MCI_WAVE_SET_ANYOUTPUT = &H8000000
  12264.  
  12265. '  flags for the dwFlags parameter of MCI_GETDEVCAPS command message
  12266. Const MCI_WAVE_GETDEVCAPS_INPUTS = &H4001&
  12267. Const MCI_WAVE_GETDEVCAPS_OUTPUTS = &H4002&
  12268.  
  12269. Type MCI_WAVE_OPEN_PARMS
  12270.         dwCallback As Long
  12271.         wDeviceID As Long
  12272.         lpstrDeviceType As String
  12273.         lpstrElementName As String
  12274.         lpstrAlias As String
  12275.         dwBufferSeconds As Long
  12276. End Type
  12277.  
  12278. Type MCI_WAVE_DELETE_PARMS
  12279.         dwCallback As Long
  12280.         dwFrom As Long
  12281.         dwTo As Long
  12282. End Type
  12283.  
  12284. Type MCI_WAVE_SET_PARMS
  12285.         dwCallback As Long
  12286.         dwTimeFormat As Long
  12287.         dwAudio As Long
  12288.         wInput As Long
  12289.         wOutput As Long
  12290.         wFormatTag As Integer
  12291.         wReserved2 As Integer
  12292.         nChannels As Integer
  12293.         wReserved3 As Integer
  12294.         nSamplesPerSec As Long
  12295.         nAvgBytesPerSec As Long
  12296.         nBlockAlign As Integer
  12297.         wReserved4 As Integer
  12298.         wBitsPerSample As Integer
  12299.         wReserved5 As Integer
  12300. End Type
  12301.  
  12302. '  flags for the dwReturn field of MCI_STATUS_PARMS parameter block
  12303. '  MCI_STATUS command, (dwItem == MCI_SEQ_STATUS_DIVTYPE)
  12304. Const MCI_SEQ_DIV_PPQN = (0 + MCI_SEQ_OFFSET)
  12305. Const MCI_SEQ_DIV_SMPTE_24 = (1 + MCI_SEQ_OFFSET)
  12306. Const MCI_SEQ_DIV_SMPTE_25 = (2 + MCI_SEQ_OFFSET)
  12307. Const MCI_SEQ_DIV_SMPTE_30DROP = (3 + MCI_SEQ_OFFSET)
  12308. Const MCI_SEQ_DIV_SMPTE_30 = (4 + MCI_SEQ_OFFSET)
  12309.  
  12310. '  flags for the dwMaster field of MCI_SEQ_SET_PARMS parameter block
  12311. '  MCI_SET command, (dwFlags == MCI_SEQ_SET_MASTER)
  12312. Const MCI_SEQ_FORMAT_SONGPTR = &H4001
  12313. Const MCI_SEQ_FILE = &H4002
  12314. Const MCI_SEQ_MIDI = &H4003
  12315. Const MCI_SEQ_SMPTE = &H4004
  12316. Const MCI_SEQ_NONE = 65533
  12317.  
  12318. Const MCI_SEQ_MAPPER = 65535
  12319.  
  12320. '  flags for the dwItem field of MCI_STATUS_PARMS parameter block
  12321. Const MCI_SEQ_STATUS_TEMPO = &H4002&
  12322. Const MCI_SEQ_STATUS_PORT = &H4003&
  12323. Const MCI_SEQ_STATUS_SLAVE = &H4007&
  12324. Const MCI_SEQ_STATUS_MASTER = &H4008&
  12325. Const MCI_SEQ_STATUS_OFFSET = &H4009&
  12326. Const MCI_SEQ_STATUS_DIVTYPE = &H400A&
  12327.  
  12328. '  flags for the dwFlags parameter of MCI_SET command message
  12329. Const MCI_SEQ_SET_TEMPO = &H10000
  12330. Const MCI_SEQ_SET_PORT = &H20000
  12331. Const MCI_SEQ_SET_SLAVE = &H40000
  12332. Const MCI_SEQ_SET_MASTER = &H80000
  12333. Const MCI_SEQ_SET_OFFSET = &H1000000
  12334.  
  12335. Type MCI_SEQ_SET_PARMS
  12336.         dwCallback As Long
  12337.         dwTimeFormat As Long
  12338.         dwAudio As Long
  12339.         dwTempo As Long
  12340.         dwPort As Long
  12341.         dwSlave As Long
  12342.         dwMaster As Long
  12343.         dwOffset As Long
  12344. End Type
  12345.  
  12346. '  flags for dwFlags parameter of MCI_OPEN command message
  12347. Const MCI_ANIM_OPEN_WS = &H10000
  12348. Const MCI_ANIM_OPEN_PARENT = &H20000
  12349. Const MCI_ANIM_OPEN_NOSTATIC = &H40000
  12350.  
  12351. '  flags for dwFlags parameter of MCI_PLAY command message
  12352. Const MCI_ANIM_PLAY_SPEED = &H10000
  12353. Const MCI_ANIM_PLAY_REVERSE = &H20000
  12354. Const MCI_ANIM_PLAY_FAST = &H40000
  12355. Const MCI_ANIM_PLAY_SLOW = &H80000
  12356. Const MCI_ANIM_PLAY_SCAN = &H100000
  12357.  
  12358. '  flags for dwFlags parameter of MCI_STEP command message
  12359. Const MCI_ANIM_STEP_REVERSE = &H10000
  12360. Const MCI_ANIM_STEP_FRAMES = &H20000
  12361.  
  12362. '  flags for dwItem field of MCI_STATUS_PARMS parameter block
  12363. Const MCI_ANIM_STATUS_SPEED = &H4001&
  12364. Const MCI_ANIM_STATUS_FORWARD = &H4002&
  12365. Const MCI_ANIM_STATUS_HWND = &H4003&
  12366. Const MCI_ANIM_STATUS_HPAL = &H4004&
  12367. Const MCI_ANIM_STATUS_STRETCH = &H4005&
  12368.  
  12369. '  flags for the dwFlags parameter of MCI_INFO command message
  12370. Const MCI_ANIM_INFO_TEXT = &H10000
  12371.  
  12372. '  flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block
  12373. Const MCI_ANIM_GETDEVCAPS_CAN_REVERSE = &H4001&
  12374. Const MCI_ANIM_GETDEVCAPS_FAST_RATE = &H4002&
  12375. Const MCI_ANIM_GETDEVCAPS_SLOW_RATE = &H4003&
  12376. Const MCI_ANIM_GETDEVCAPS_NORMAL_RATE = &H4004&
  12377. Const MCI_ANIM_GETDEVCAPS_PALETTES = &H4006&
  12378. Const MCI_ANIM_GETDEVCAPS_CAN_STRETCH = &H4007&
  12379. Const MCI_ANIM_GETDEVCAPS_MAX_WINDOWS = &H4008&
  12380.  
  12381. '  flags for the MCI_REALIZE command message
  12382. Const MCI_ANIM_REALIZE_NORM = &H10000
  12383. Const MCI_ANIM_REALIZE_BKGD = &H20000
  12384.  
  12385. '  flags for dwFlags parameter of MCI_WINDOW command message
  12386. Const MCI_ANIM_WINDOW_HWND = &H10000
  12387. Const MCI_ANIM_WINDOW_STATE = &H40000
  12388. Const MCI_ANIM_WINDOW_TEXT = &H80000
  12389. Const MCI_ANIM_WINDOW_ENABLE_STRETCH = &H100000
  12390. Const MCI_ANIM_WINDOW_DISABLE_STRETCH = &H200000
  12391.  
  12392. '  flags for hWnd field of MCI_ANIM_WINDOW_PARMS parameter block
  12393. '  MCI_WINDOW command message, (dwFlags == MCI_ANIM_WINDOW_HWND)
  12394. Const MCI_ANIM_WINDOW_DEFAULT = &H0&
  12395.  
  12396. '  flags for dwFlags parameter of MCI_PUT command message
  12397. Const MCI_ANIM_RECT = &H10000
  12398. Const MCI_ANIM_PUT_SOURCE = &H20000      '  also  MCI_WHERE
  12399. Const MCI_ANIM_PUT_DESTINATION = &H40000      '  also  MCI_WHERE
  12400.  
  12401. '  flags for dwFlags parameter of MCI_WHERE command message
  12402. Const MCI_ANIM_WHERE_SOURCE = &H20000
  12403. Const MCI_ANIM_WHERE_DESTINATION = &H40000
  12404.  
  12405. '  flags for dwFlags parameter of MCI_UPDATE command message
  12406. Const MCI_ANIM_UPDATE_HDC = &H20000
  12407.  
  12408. Type MCI_ANIM_OPEN_PARMS
  12409.         dwCallback As Long
  12410.         wDeviceID As Long
  12411.         lpstrDeviceType As String
  12412.         lpstrElementName As String
  12413.         lpstrAlias As String
  12414.         dwStyle As Long
  12415.         hWndParent As Long
  12416. End Type
  12417.  
  12418. Type MCI_ANIM_PLAY_PARMS
  12419.         dwCallback As Long
  12420.         dwFrom As Long
  12421.         dwTo As Long
  12422.         dwSpeed As Long
  12423. End Type
  12424.  
  12425. Type MCI_ANIM_STEP_PARMS
  12426.         dwCallback As Long
  12427.         dwFrames As Long
  12428. End Type
  12429.  
  12430. Type MCI_ANIM_WINDOW_PARMS
  12431.         dwCallback As Long
  12432.         hwnd As Long
  12433.         nCmdShow As Long
  12434.         lpstrText As String
  12435. End Type
  12436.  
  12437. Type MCI_ANIM_RECT_PARMS
  12438.         dwCallback As Long
  12439.         rc As Rect
  12440. End Type
  12441.  
  12442. Type MCI_ANIM_UPDATE_PARMS
  12443.         dwCallback As Long
  12444.         rc As Rect
  12445.         hdc As Long
  12446. End Type
  12447.  
  12448. '  flags for dwFlags parameter of MCI_OPEN command message
  12449. Const MCI_OVLY_OPEN_WS = &H10000
  12450. Const MCI_OVLY_OPEN_PARENT = &H20000
  12451.  
  12452. '  flags for dwFlags parameter of MCI_STATUS command message
  12453. Const MCI_OVLY_STATUS_HWND = &H4001&
  12454. Const MCI_OVLY_STATUS_STRETCH = &H4002&
  12455.  
  12456. '  flags for dwFlags parameter of MCI_INFO command message
  12457. Const MCI_OVLY_INFO_TEXT = &H10000
  12458.  
  12459. '  flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block
  12460. Const MCI_OVLY_GETDEVCAPS_CAN_STRETCH = &H4001&
  12461. Const MCI_OVLY_GETDEVCAPS_CAN_FREEZE = &H4002&
  12462. Const MCI_OVLY_GETDEVCAPS_MAX_WINDOWS = &H4003&
  12463.  
  12464. '  flags for dwFlags parameter of MCI_WINDOW command message
  12465. Const MCI_OVLY_WINDOW_HWND = &H10000
  12466. Const MCI_OVLY_WINDOW_STATE = &H40000
  12467. Const MCI_OVLY_WINDOW_TEXT = &H80000
  12468. Const MCI_OVLY_WINDOW_ENABLE_STRETCH = &H100000
  12469. Const MCI_OVLY_WINDOW_DISABLE_STRETCH = &H200000
  12470.  
  12471. '  flags for hWnd parameter of MCI_OVLY_WINDOW_PARMS parameter block
  12472. Const MCI_OVLY_WINDOW_DEFAULT = &H0&
  12473.  
  12474. '  flags for dwFlags parameter of MCI_PUT command message
  12475. Const MCI_OVLY_RECT = &H10000
  12476. Const MCI_OVLY_PUT_SOURCE = &H20000
  12477. Const MCI_OVLY_PUT_DESTINATION = &H40000
  12478. Const MCI_OVLY_PUT_FRAME = &H80000
  12479. Const MCI_OVLY_PUT_VIDEO = &H100000
  12480.  
  12481. '  flags for dwFlags parameter of MCI_WHERE command message
  12482. Const MCI_OVLY_WHERE_SOURCE = &H20000
  12483. Const MCI_OVLY_WHERE_DESTINATION = &H40000
  12484. Const MCI_OVLY_WHERE_FRAME = &H80000
  12485. Const MCI_OVLY_WHERE_VIDEO = &H100000
  12486.  
  12487. Type MCI_OVLY_OPEN_PARMS
  12488.         dwCallback As Long
  12489.         wDeviceID As Long
  12490.         lpstrDeviceType As String
  12491.         lpstrElementName As String
  12492.         lpstrAlias As String
  12493.         dwStyle As Long
  12494.         hWndParent As Long
  12495. End Type
  12496.  
  12497. Type MCI_OVLY_WINDOW_PARMS
  12498.         dwCallback As Long
  12499.         hwnd As Long
  12500.         nCmdShow As Long
  12501.         lpstrText As String
  12502. End Type
  12503.  
  12504. Type MCI_OVLY_RECT_PARMS
  12505.         dwCallback As Long
  12506.         rc As Rect
  12507. End Type
  12508.  
  12509. Type MCI_OVLY_SAVE_PARMS
  12510.         dwCallback As Long
  12511.         lpFileName As String
  12512.         rc As Rect
  12513. End Type
  12514.  
  12515. Type MCI_OVLY_LOAD_PARMS
  12516.         dwCallback As Long
  12517.         lpFileName As String
  12518.         rc As Rect
  12519. End Type
  12520.  
  12521. Const CAPS1 = 94              '  other caps
  12522. Const C1_TRANSPARENT = &H1     '  new raster cap
  12523. Const NEWTRANSPARENT = 3  '  use with SetBkMode()
  12524.  
  12525. Const QUERYROPSUPPORT = 40  '  use to determine ROP support
  12526.  
  12527. Const SELECTDIB = 41  '  DIB.DRV select dib escape
  12528.  
  12529. ' ----------------
  12530. ' shell association database management functions
  12531. ' -----------------
  12532.  
  12533. '  error values for ShellExecute() beyond the regular WinExec() codes
  12534. Const SE_ERR_SHARE = 26
  12535. Const SE_ERR_ASSOCINCOMPLETE = 27
  12536. Const SE_ERR_DDETIMEOUT = 28
  12537. Const SE_ERR_DDEFAIL = 29
  12538. Const SE_ERR_DDEBUSY = 30
  12539. Const SE_ERR_NOASSOC = 31
  12540.  
  12541. ' -------------
  12542. ' Print APIs
  12543. ' -------------
  12544.  
  12545. Type PRINTER_INFO_1
  12546.         flags As Long
  12547.         pDescription As String
  12548.         pName As String
  12549.         pComment As String
  12550. End Type
  12551.  
  12552. Type PRINTER_INFO_2
  12553.         pServerName As String
  12554.         pPrinterName As String
  12555.         pShareName As String
  12556.         pPortName As String
  12557.         pDriverName As String
  12558.         pComment As String
  12559.         pLocation As String
  12560.         pDevMode As DEVMODE
  12561.         pSepFile As String
  12562.         pPrintProcessor As String
  12563.         pDatatype As String
  12564.         pParameters As String
  12565.         pSecurityDescriptor As SECURITY_DESCRIPTOR
  12566.         Attributes As Long
  12567.         Priority As Long
  12568.         DefaultPriority As Long
  12569.         StartTime As Long
  12570.         UntilTime As Long
  12571.         Status As Long
  12572.         cJobs As Long
  12573.         AveragePPM As Long
  12574. End Type
  12575.  
  12576. Type PRINTER_INFO_3
  12577.         pSecurityDescriptor As SECURITY_DESCRIPTOR
  12578. End Type
  12579.  
  12580. Const PRINTER_CONTROL_PAUSE = 1
  12581. Const PRINTER_CONTROL_RESUME = 2
  12582. Const PRINTER_CONTROL_PURGE = 3
  12583.  
  12584. Const PRINTER_STATUS_PAUSED = &H1
  12585. Const PRINTER_STATUS_ERROR = &H2
  12586. Const PRINTER_STATUS_PENDING_DELETION = &H4
  12587. Const PRINTER_STATUS_PAPER_JAM = &H8
  12588. Const PRINTER_STATUS_PAPER_OUT = &H10
  12589. Const PRINTER_STATUS_MANUAL_FEED = &H20
  12590. Const PRINTER_STATUS_PAPER_PROBLEM = &H40
  12591. Const PRINTER_STATUS_OFFLINE = &H80
  12592. Const PRINTER_STATUS_IO_ACTIVE = &H100
  12593. Const PRINTER_STATUS_BUSY = &H200
  12594. Const PRINTER_STATUS_PRINTING = &H400
  12595. Const PRINTER_STATUS_OUTPUT_BIN_FULL = &H800
  12596. Const PRINTER_STATUS_NOT_AVAILABLE = &H1000
  12597. Const PRINTER_STATUS_WAITING = &H2000
  12598. Const PRINTER_STATUS_PROCESSING = &H4000
  12599. Const PRINTER_STATUS_INITIALIZING = &H8000
  12600. Const PRINTER_STATUS_WARMING_UP = &H10000
  12601. Const PRINTER_STATUS_TONER_LOW = &H20000
  12602. Const PRINTER_STATUS_NO_TONER = &H40000
  12603. Const PRINTER_STATUS_PAGE_PUNT = &H80000
  12604. Const PRINTER_STATUS_USER_INTERVENTION = &H100000
  12605. Const PRINTER_STATUS_OUT_OF_MEMORY = &H200000
  12606. Const PRINTER_STATUS_DOOR_OPEN = &H400000
  12607.  
  12608. Const PRINTER_ATTRIBUTE_QUEUED = &H1
  12609. Const PRINTER_ATTRIBUTE_DIRECT = &H2
  12610. Const PRINTER_ATTRIBUTE_DEFAULT = &H4
  12611. Const PRINTER_ATTRIBUTE_SHARED = &H8
  12612. Const PRINTER_ATTRIBUTE_NETWORK = &H10
  12613. Const PRINTER_ATTRIBUTE_HIDDEN = &H20
  12614. Const PRINTER_ATTRIBUTE_LOCAL = &H40
  12615.  
  12616. Const NO_PRIORITY = 0
  12617. Const MAX_PRIORITY = 99
  12618. Const MIN_PRIORITY = 1
  12619. Const DEF_PRIORITY = 1
  12620.  
  12621. Type JOB_INFO_1
  12622.         JobId As Long
  12623.         pPrinterName As String
  12624.         pMachineName As String
  12625.         pUserName As String
  12626.         pDocument As String
  12627.         pDatatype As String
  12628.         pStatus As String
  12629.         Status As Long
  12630.         Priority As Long
  12631.         Position As Long
  12632.         TotalPages As Long
  12633.         PagesPrinted As Long
  12634.         Submitted As SYSTEMTIME
  12635. End Type
  12636.  
  12637. Type JOB_INFO_2
  12638.         JobId As Long
  12639.         pPrinterName As String
  12640.         pMachineName As String
  12641.         pUserName As String
  12642.         pDocument As String
  12643.         pNotifyName As String
  12644.         pDatatype As String
  12645.         pPrintProcessor As String
  12646.         pParameters As String
  12647.         pDriverName As String
  12648.         pDevMode As DEVMODE
  12649.         pStatus As String
  12650.         pSecurityDescriptor As SECURITY_DESCRIPTOR
  12651.         Status As Long
  12652.         Priority As Long
  12653.         Position As Long
  12654.         StartTime As Long
  12655.         UntilTime As Long
  12656.         TotalPages As Long
  12657.         Size As Long
  12658.         Submitted As SYSTEMTIME
  12659.         time As Long
  12660.         PagesPrinted As Long
  12661. End Type
  12662.  
  12663. Const JOB_CONTROL_PAUSE = 1
  12664. Const JOB_CONTROL_RESUME = 2
  12665. Const JOB_CONTROL_CANCEL = 3
  12666. Const JOB_CONTROL_RESTART = 4
  12667.  
  12668. Const JOB_STATUS_PAUSED = &H1
  12669. Const JOB_STATUS_ERROR = &H2
  12670. Const JOB_STATUS_DELETING = &H4
  12671. Const JOB_STATUS_SPOOLING = &H8
  12672. Const JOB_STATUS_PRINTING = &H10
  12673. Const JOB_STATUS_OFFLINE = &H20
  12674. Const JOB_STATUS_PAPEROUT = &H40
  12675. Const JOB_STATUS_PRINTED = &H80
  12676.  
  12677. Const JOB_POSITION_UNSPECIFIED = 0
  12678.  
  12679. Type ADDJOB_INFO_1
  12680.         Path As String
  12681.         JobId As Long
  12682. End Type
  12683.  
  12684. Type DRIVER_INFO_1
  12685.         pName As String
  12686. End Type
  12687.  
  12688. Type DRIVER_INFO_2
  12689.         cVersion As Long
  12690.         pName As String
  12691.         pEnvironment As String
  12692.         pDriverPath As String
  12693.         pDataFile As String
  12694.         pConfigFile As String
  12695. End Type
  12696.  
  12697. Type DOC_INFO_1
  12698.         pDocName As String
  12699.         pOutputFile As String
  12700.         pDatatype As String
  12701. End Type
  12702.  
  12703. Type FORM_INFO_1
  12704.         pName As String
  12705.         Size As SIZEL
  12706.         ImageableArea As RECTL
  12707. End Type
  12708.  
  12709. Const FORM_BUILTIN = &H1
  12710.  
  12711. Type PRINTPROCESSOR_INFO_1
  12712.         pName As String
  12713. End Type
  12714.  
  12715. Type PORT_INFO_1
  12716.         pName As String
  12717. End Type
  12718.  
  12719. Type MONITOR_INFO_1
  12720.         pName As String
  12721. End Type
  12722.  
  12723. Type MONITOR_INFO_2
  12724.         pName As String
  12725.         pEnvironment As String
  12726.         pDLLName As String
  12727. End Type
  12728.  
  12729. Type DATATYPES_INFO_1
  12730.         pName As String
  12731. End Type
  12732.  
  12733. Type PRINTER_DEFAULTS
  12734.         pDatatype As String
  12735.         pDevMode As DEVMODE
  12736.         DesiredAccess As Long
  12737. End Type
  12738.  
  12739. Type PRINTER_INFO_4
  12740.     pPrinterName As String
  12741.     pServerName As String
  12742.     Attributes As Long
  12743. End Type
  12744.  
  12745. Type PRINTER_INFO_5
  12746.         pPrinterName As String
  12747.         pPortName As String
  12748.         Attributes As Long
  12749.         DeviceNotSelectedTimeout As Long
  12750.         TransmissionRetryTimeout As Long
  12751. End Type
  12752.  
  12753. Const PRINTER_CONTROL_SET_STATUS = 4
  12754. Const PRINTER_ATTRIBUTE_WORK_OFFLINE = &H400
  12755. Const PRINTER_ATTRIBUTE_ENABLE_BIDI = &H800
  12756. Const JOB_CONTROL_DELETE = 5
  12757. Const JOB_STATUS_USER_INTERVENTION = &H10000
  12758.  
  12759. Type DRIVER_INFO_3
  12760.         cVersion As Long
  12761.         pName As String                    '  QMS 810
  12762.         pEnvironment As String             '  Win32 x86
  12763.         pDriverPath As String              '  c:\drivers\pscript.dll
  12764.         pDataFile As String                '  c:\drivers\QMS810.PPD
  12765.         pConfigFile As String              '  c:\drivers\PSCRPTUI.DLL
  12766.         pHelpFile As String                '  c:\drivers\PSCRPTUI.HLP
  12767.         pDependentFiles As String          '
  12768.         pMonitorName As String             '  "PJL monitor"
  12769.         pDefaultDataType As String         '  "EMF"
  12770. End Type
  12771.  
  12772. Type DOC_INFO_2
  12773.         pDocName As String
  12774.         pOutputFile As String
  12775.         pDatatype As String
  12776.         dwMode As Long
  12777.         JobId As Long
  12778. End Type
  12779.  
  12780. Const DI_CHANNEL = 1                  '  start direct read/write channel,
  12781. Const DI_READ_SPOOL_JOB = 3
  12782.  
  12783. Type PORT_INFO_2
  12784.         pPortName As String
  12785.         pMonitorName As String
  12786.         pDescription As String
  12787.         fPortType As Long
  12788.         Reserved As Long
  12789. End Type
  12790.  
  12791. Const PORT_TYPE_WRITE = &H1
  12792. Const PORT_TYPE_READ = &H2
  12793. Const PORT_TYPE_REDIRECTED = &H4
  12794. Const PORT_TYPE_NET_ATTACHED = &H8
  12795.  
  12796. Declare Function EnumPrinters Lib "winspool.drv" Alias "EnumPrintersA" (ByVal flags As Long, ByVal name As String, ByVal Level As Long, pPrinterEnum As Byte, ByVal cdBuf As Long, pcbNeeded As Long, pcReturned As Long) As Long
  12797.  
  12798. Declare Function EnumPrinterPropertySheets Lib "winspool.drv" Alias "EnumPrinterPropertySheets" (hPrinter As Long, hwnd As Long, lpfnAdd As Long, ByVal lParam As Long) As Long
  12799.  
  12800. Const PRINTER_ENUM_DEFAULT = &H1
  12801. Const PRINTER_ENUM_LOCAL = &H2
  12802. Const PRINTER_ENUM_CONNECTIONS = &H4
  12803. Const PRINTER_ENUM_FAVORITE = &H4
  12804. Const PRINTER_ENUM_NAME = &H8
  12805. Const PRINTER_ENUM_REMOTE = &H10
  12806. Const PRINTER_ENUM_SHARED = &H20
  12807. Const PRINTER_ENUM_NETWORK = &H40
  12808.  
  12809. Const PRINTER_ENUM_EXPAND = &H4000
  12810. Const PRINTER_ENUM_CONTAINER = &H8000
  12811.  
  12812. Const PRINTER_ENUM_ICONMASK = &HFF0000
  12813. Const PRINTER_ENUM_ICON1 = &H10000
  12814. Const PRINTER_ENUM_ICON2 = &H20000
  12815. Const PRINTER_ENUM_ICON3 = &H40000
  12816. Const PRINTER_ENUM_ICON4 = &H80000
  12817. Const PRINTER_ENUM_ICON5 = &H100000
  12818. Const PRINTER_ENUM_ICON6 = &H200000
  12819. Const PRINTER_ENUM_ICON7 = &H400000
  12820. Const PRINTER_ENUM_ICON8 = &H800000
  12821.  
  12822. Declare Function OpenPrinter Lib "winspool.drv" Alias "OpenPrinterA" (ByVal pPrinterName As String, phPrinter As Long, pDefault As PRINTER_DEFAULTS) As Long
  12823. Declare Function ResetPrinter Lib "winspool.drv" Alias "ResetPrinterA" (ByVal hPrinter As Long, pDefault As PRINTER_DEFAULTS) As Long
  12824. Declare Function SetJob Lib "winspool.drv" Alias "SetJobA" (ByVal hPrinter As Long, ByVal JobId As Long, ByVal Level As Long, pJob As Byte, ByVal Command As Long) As Long
  12825. Declare Function GetJob Lib "winspool.drv" Alias "GetJobA" (ByVal hPrinter As Long, ByVal JobId As Long, ByVal Level As Long, pJob As Byte, ByVal cdBuf As Long, pcbNeeded As Long) As Long
  12826. Declare Function EnumJobs Lib "winspool.drv" Alias "EnumJobsA" (ByVal hPrinter As Long, ByVal FirstJob As Long, ByVal NoJobs As Long, ByVal Level As Long, pJob As Byte, ByVal cdBuf As Long, pcbNeeded As Long, pcReturned As Long) As Long
  12827. Declare Function AddPrinter Lib "winspool.drv" Alias "AddPrinterA" (ByVal pName As String, ByVal Level As Long, pPrinter As Any) As Long
  12828.  
  12829. Declare Function AddPrinterDriver Lib "winspool.drv" Alias "AddPrinterDriverA" (ByVal pName As String, ByVal Level As Long, pDriverInfo As Any) As Long
  12830.  
  12831. Declare Function EnumPrinterDrivers Lib "winspool.drv" Alias "EnumPrinterDriversA" (ByVal pName As String, ByVal pEnvironment As String, ByVal Level As Long, pDriverInfo As Byte, ByVal cdBuf As Long, pcbNeeded As Long, pcRetruned As Long) As Long
  12832. Declare Function GetPrinterDriver Lib "winspool.drv" Alias "GetPrinterDriverA" (ByVal hPrinter As Long, ByVal pEnvironment As String, ByVal Level As Long, pDriverInfo As Byte, ByVal cdBuf As Long, pcbNeeded As Long) As Long
  12833. Declare Function GetPrinterDriverDirectory Lib "winspool.drv" Alias "GetPrinterDriverDirectoryA" (ByVal pName As String, ByVal pEnvironment As String, ByVal Level As Long, pDriverDirectory As Byte, ByVal cdBuf As Long, pcbNeeded As Long) As Long
  12834. Declare Function DeletePrinterDriver Lib "winspool.drv" Alias "DeletePrinterDriverA" (ByVal pName As String, ByVal pEnvironment As String, ByVal pDriverName As String) As Long
  12835.  
  12836. Declare Function AddPrintProcessor Lib "winspool.drv" Alias "AddPrintProcessorA" (ByVal pName As String, ByVal pEnvironment As String, ByVal pPathName As String, ByVal pPrintProcessorName As String) As Long
  12837. Declare Function EnumPrintProcessors Lib "winspool.drv" Alias "EnumPrintProcessorsA" (ByVal pName As String, ByVal pEnvironment As String, ByVal Level As Long, pPrintProcessorInfo As Byte, ByVal cdBuf As Long, pcbNeeded As Long, pcReturned As Long) As Long
  12838. Declare Function GetPrintProcessorDirectory Lib "winspool.drv" Alias "GetPrintProcessorDirectoryA" (ByVal pName As String, ByVal pEnvironment As String, ByVal Level As Long, ByVal pPrintProcessorInfo As String, ByVal cdBuf As Long, pcbNeeded As Long) As Long
  12839. Declare Function EnumPrintProcessorDatatypes Lib "winspool.drv" Alias "EnumPrintProcessorDatatypesA" (ByVal pName As String, ByVal pPrintProcessorName As String, ByVal Level As Long, pDatatypes As Byte, ByVal cdBuf As Long, pcbNeeded As Long, pcRetruned As Long) As Long
  12840. Declare Function DeletePrintProcessor Lib "winspool.drv" Alias "DeletePrintProcessorA" (ByVal pName As String, ByVal pEnvironment As String, ByVal pPrintProcessorName As String) As Long
  12841.  
  12842. Declare Function StartDocPrinter Lib "winspool.drv" Alias "StartDocPrinterA" (ByVal hPrinter As Long, ByVal Level As Long, pDocInfo As Byte) As Long
  12843. Declare Function StartPagePrinter Lib "winspool.drv" Alias "StartPagePrinter" (ByVal hPrinter As Long) As Long
  12844. Declare Function WritePrinter Lib "winspool.drv" Alias "WritePrinter" (ByVal hPrinter As Long, pBuf As Any, ByVal cdBuf As Long, pcWritten As Long) As Long
  12845. Declare Function EndPagePrinter Lib "winspool.drv" Alias "EndPagePrinter" (ByVal hPrinter As Long) As Long
  12846. Declare Function AbortPrinter Lib "winspool.drv" Alias "AbortPrinter" (ByVal hPrinter As Long) As Long
  12847. Declare Function ReadPrinter Lib "winspool.drv" Alias "ReadPrinter" (ByVal hPrinter As Long, pBuf As Any, ByVal cdBuf As Long, pNoBytesRead As Long) As Long
  12848. Declare Function EndDocPrinter Lib "winspool.drv" Alias "EndDocPrinter" (ByVal hPrinter As Long) As Long
  12849.  
  12850. Declare Function AddJob Lib "winspool.drv" Alias "AddJobA" (ByVal hPrinter As Long, ByVal Level As Long, pData As Byte, ByVal cdBuf As Long, pcbNeeded As Long) As Long
  12851. Declare Function ScheduleJob Lib "winspool.drv" Alias "ScheduleJob" (ByVal hPrinter As Long, ByVal JobId As Long) As Long
  12852. Declare Function PrinterProperties Lib "winspool.drv" Alias "PrinterProperties" (ByVal hwnd As Long, ByVal hPrinter As Long) As Long
  12853. Declare Function DocumentProperties Lib "winspool.drv" Alias "DocumentPropertiesA" (ByVal hwnd As Long, ByVal hPrinter As Long, ByVal pDeviceName As String, pDevModeOutput As DEVMODE, pDevModeInput As DEVMODE, ByVal fMode As Long) As Long
  12854. Declare Function AdvancedDocumentProperties Lib "winspool.drv" Alias "AdvancedDocumentPropertiesA" (ByVal hwnd As Long, ByVal hPrinter As Long, ByVal pDeviceName As String, pDevModeOutput As DEVMODE, pDevModeInput As DEVMODE) As Long
  12855.  
  12856. Declare Function GetPrinterData Lib "winspool.drv" Alias "GetPrinterDataA" (ByVal hPrinter As Long, ByVal pValueName As String, pType As Long, pData As Byte, ByVal nSize As Long, pcbNeeded As Long) As Long
  12857. Declare Function SetPrinterData Lib "winspool.drv" Alias "SetPrinterDataA" (ByVal hPrinter As Long, ByVal pValueName As String, ByVal dwType As Long, pData As Byte, ByVal cbData As Long) As Long
  12858. Declare Function WaitForPrinterChange Lib "winspool.drv" Alias "WaitForPrinterChange" (ByVal hPrinter As Long, ByVal flags As Long) As Long
  12859.  
  12860. Const PRINTER_CHANGE_ADD_PRINTER = &H1
  12861. Const PRINTER_CHANGE_SET_PRINTER = &H2
  12862. Const PRINTER_CHANGE_DELETE_PRINTER = &H4
  12863. Const PRINTER_CHANGE_PRINTER = &HFF
  12864. Const PRINTER_CHANGE_ADD_JOB = &H100
  12865. Const PRINTER_CHANGE_SET_JOB = &H200
  12866. Const PRINTER_CHANGE_DELETE_JOB = &H400
  12867. Const PRINTER_CHANGE_WRITE_JOB = &H800
  12868. Const PRINTER_CHANGE_JOB = &HFF00
  12869. Const PRINTER_CHANGE_ADD_FORM = &H10000
  12870. Const PRINTER_CHANGE_SET_FORM = &H20000
  12871. Const PRINTER_CHANGE_DELETE_FORM = &H40000
  12872. Const PRINTER_CHANGE_FORM = &H70000
  12873. Const PRINTER_CHANGE_ADD_PORT = &H100000
  12874. Const PRINTER_CHANGE_CONFIGURE_PORT = &H200000
  12875. Const PRINTER_CHANGE_DELETE_PORT = &H400000
  12876. Const PRINTER_CHANGE_PORT = &H700000
  12877. Const PRINTER_CHANGE_ADD_PRINT_PROCESSOR = &H1000000
  12878. Const PRINTER_CHANGE_DELETE_PRINT_PROCESSOR = &H4000000
  12879. Const PRINTER_CHANGE_PRINT_PROCESSOR = &H7000000
  12880. Const PRINTER_CHANGE_ADD_PRINTER_DRIVER = &H10000000
  12881. Const PRINTER_CHANGE_DELETE_PRINTER_DRIVER = &H40000000
  12882. Const PRINTER_CHANGE_PRINTER_DRIVER = &H70000000
  12883. Const PRINTER_CHANGE_TIMEOUT = &H80000000
  12884. Const PRINTER_CHANGE_ALL = &H7777FFFF
  12885.  
  12886. Declare Function PrinterMessageBox Lib "winspool.drv" Alias "PrinterMessageBoxA" (ByVal hPrinter As Long, ByVal error As Long, ByVal hwnd As Long, ByVal pText As String, ByVal pCaption As String, ByVal dwType As Long) As Long
  12887.  
  12888. Const PRINTER_ERROR_INFORMATION = &H80000000
  12889. Const PRINTER_ERROR_WARNING = &H40000000
  12890. Const PRINTER_ERROR_SEVERE = &H20000000
  12891.  
  12892. Const PRINTER_ERROR_OUTOFPAPER = &H1
  12893. Const PRINTER_ERROR_JAM = &H2
  12894. Const PRINTER_ERROR_OUTOFTONER = &H4
  12895.  
  12896. Declare Function ClosePrinter Lib "winspool.drv" Alias "ClosePrinter" (ByVal hPrinter As Long) As Long
  12897. Declare Function AddForm Lib "winspool.drv" Alias "AddFormA" (ByVal hPrinter As Long, ByVal Level As Long, pForm As Byte) As Long
  12898. Declare Function DeleteForm Lib "winspool.drv" Alias "DeleteFormA" (ByVal hPrinter As Long, ByVal pFormName As String) As Long
  12899. Declare Function GetForm Lib "winspool.drv" Alias "GetFormA" (ByVal hPrinter As Long, ByVal pFormName As String, ByVal Level As Long, pForm As Byte, ByVal cbBuf As Long, pcbNeeded As Long) As Long
  12900. Declare Function SetForm Lib "winspool.drv" Alias "SetFormA" (ByVal hPrinter As Long, ByVal pFormName As String, ByVal Level As Long, pForm As Byte) As Long
  12901. Declare Function EnumForms Lib "winspool.drv" Alias "EnumFormsA" (ByVal hPrinter As Long, ByVal Level As Long, pForm As Byte, ByVal cbBuf As Long, pcbNeeded As Long, pcReturned As Long) As Long
  12902.  
  12903. Declare Function EnumMonitors Lib "winspool.drv" Alias "EnumMonitorsA" (ByVal pName As String, ByVal Level As Long, pMonitors As Byte, ByVal cbBuf As Long, pcbNeeded As Long, pcReturned As Long) As Long
  12904. Declare Function AddMonitor Lib "winspool.drv" Alias "AddMonitorA" (ByVal pName As String, ByVal Level As Long, pMonitors As Byte) As Long
  12905. Declare Function DeleteMonitor Lib "winspool.drv" Alias "DeleteMonitorA" (ByVal pName As String, ByVal pEnvironment As String, ByVal pMonitorName As String) As Long
  12906.  
  12907. Declare Function EnumPorts Lib "winspool.drv" Alias "EnumPortsA" (ByVal pName As String, ByVal Level As Long, ByVal lpbPorts As Long, ByVal cbBuf As Long, pcbNeeded As Long, pcReturned As Long) As Long
  12908. Declare Function AddPort Lib "winspool.drv" Alias "AddPortA" (ByVal pName As String, ByVal hwnd As Long, ByVal pMonitorName As String) As Long
  12909. Declare Function ConfigurePort Lib "winspool.drv" Alias "ConfigurePortA" (ByVal pName As String, ByVal hwnd As Long, ByVal pPortName As String) As Long
  12910. Declare Function DeletePort Lib "winspool.drv" Alias "DeletePortA" (ByVal pName As String, ByVal hwnd As Long, ByVal pPortName As String) As Long
  12911.  
  12912. Declare Function AddPrinterConnection Lib "winspool.drv" Alias "AddPrinterConnectionA" (ByVal pName As String) As Long
  12913.  
  12914. Declare Function DeletePrinterConnection Lib "winspool.drv" Alias "DeletePrinterConnectionA" (ByVal pName As String) As Long
  12915. Declare Function ConnectToPrinterDlg Lib "winspool.drv" Alias "ConnectToPrinterDlg" (ByVal hwnd As Long, ByVal flags As Long) As Long
  12916.  
  12917. Type PROVIDOR_INFO_1
  12918.         pName As String
  12919.         pEnvironment As String
  12920.         pDLLName As String
  12921. End Type
  12922.  
  12923. Declare Function AddPrintProvidor Lib "winspool.drv" Alias "AddPrintProvidorA" (ByVal pName As String, ByVal Level As Long, pProvidorInfo As Byte) As Long
  12924. Declare Function DeletePrintProvidor Lib "winspool.drv" Alias "DeletePrintProvidorA" (ByVal pName As String, ByVal pEnvironment As String, ByVal pPrintProvidorName As String) As Long
  12925.  
  12926. Const SERVER_ACCESS_ADMINISTER = &H1
  12927. Const SERVER_ACCESS_ENUMERATE = &H2
  12928.  
  12929. Const PRINTER_ACCESS_ADMINISTER = &H4
  12930. Const PRINTER_ACCESS_USE = &H8
  12931.  
  12932. Const JOB_ACCESS_ADMINISTER = &H10
  12933.  
  12934. ' Access rights for print servers
  12935.  
  12936. Const SERVER_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED Or SERVER_ACCESS_ADMINISTER Or SERVER_ACCESS_ENUMERATE)
  12937. Const SERVER_READ = (STANDARD_RIGHTS_READ Or SERVER_ACCESS_ENUMERATE)
  12938. Const SERVER_WRITE = (STANDARD_RIGHTS_WRITE Or SERVER_ACCESS_ADMINISTER Or SERVER_ACCESS_ENUMERATE)
  12939. Const SERVER_EXECUTE = (STANDARD_RIGHTS_EXECUTE Or SERVER_ACCESS_ENUMERATE)
  12940.  
  12941. ' Access rights for printers
  12942. Const PRINTER_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED Or PRINTER_ACCESS_ADMINISTER Or PRINTER_ACCESS_USE)
  12943. Const PRINTER_READ = (STANDARD_RIGHTS_READ Or PRINTER_ACCESS_USE)
  12944. Const PRINTER_WRITE = (STANDARD_RIGHTS_WRITE Or PRINTER_ACCESS_USE)
  12945. Const PRINTER_EXECUTE = (STANDARD_RIGHTS_EXECUTE Or PRINTER_ACCESS_USE)
  12946.  
  12947. ' Access rights for jobs
  12948. Const JOB_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED Or JOB_ACCESS_ADMINISTER)
  12949. Const JOB_READ = (STANDARD_RIGHTS_READ Or JOB_ACCESS_ADMINISTER)
  12950. Const JOB_WRITE = (STANDARD_RIGHTS_WRITE Or JOB_ACCESS_ADMINISTER)
  12951. Const JOB_EXECUTE = (STANDARD_RIGHTS_EXECUTE Or JOB_ACCESS_ADMINISTER)
  12952.  
  12953. '  Windows Network support
  12954.  
  12955. '  RESOURCE ENUMERATION
  12956.  
  12957. Const RESOURCE_CONNECTED = &H1
  12958. Const RESOURCE_PUBLICNET = &H2
  12959. Const RESOURCE_REMEMBERED = &H3
  12960.  
  12961. Const RESOURCETYPE_ANY = &H0
  12962. Const RESOURCETYPE_DISK = &H1
  12963. Const RESOURCETYPE_PRINT = &H2
  12964. Const RESOURCETYPE_UNKNOWN = &HFFFF
  12965.  
  12966. Const RESOURCEUSAGE_CONNECTABLE = &H1
  12967. Const RESOURCEUSAGE_CONTAINER = &H2
  12968. Const RESOURCEUSAGE_RESERVED = &H80000000
  12969.  
  12970. Const RESOURCEDISPLAYTYPE_GENERIC = &H0
  12971. Const RESOURCEDISPLAYTYPE_DOMAIN = &H1
  12972. Const RESOURCEDISPLAYTYPE_SERVER = &H2
  12973. Const RESOURCEDISPLAYTYPE_SHARE = &H3
  12974. Const RESOURCEDISPLAYTYPE_FILE = &H4
  12975. Const RESOURCEDISPLAYTYPE_GROUP = &H5
  12976.  
  12977. Type NETRESOURCE
  12978.         dwScope As Long
  12979.         dwType As Long
  12980.         dwDisplayType As Long
  12981.         dwUsage As Long
  12982.         lpLocalName As String
  12983.         lpRemoteName As String
  12984.         lpComment As String
  12985.         lpProvider As String
  12986. End Type
  12987.  
  12988. Const CONNECT_UPDATE_PROFILE = &H1
  12989.  
  12990. Declare Function WNetAddConnection Lib "mpr.dll" Alias "WNetAddConnectionA" (ByVal lpszNetPath As String, ByVal lpszPassword As String, ByVal lpszLocalName As String) As Long
  12991. Declare Function WNetAddConnection2 Lib "mpr.dll" Alias "WNetAddConnection2A" (lpNetResource As NETRESOURCE, ByVal lpPassword As String, ByVal lpUserName As String, ByVal dwFlags As Long) As Long
  12992. Declare Function WNetCancelConnection Lib "mpr.dll" Alias "WNetCancelConnectionA" (ByVal lpszName As String, ByVal bForce As Long) As Long
  12993. Declare Function WNetCancelConnection2 Lib "mpr.dll" Alias "WNetCancelConnection2A" (ByVal lpName As String, ByVal dwFlags As Long, ByVal fForce As Long) As Long
  12994. Declare Function WNetGetConnection Lib "mpr.dll" Alias "WNetGetConnectionA" (ByVal lpszLocalName As String, ByVal lpszRemoteName As String, cbRemoteName As Long) As Long
  12995. Declare Function WNetOpenEnum Lib "mpr.dll" Alias "WNetOpenEnumA" (ByVal dwScope As Long, ByVal dwType As Long, ByVal dwUsage As Long, lpNetResource As NETRESOURCE, lphEnum As Long) As Long
  12996. Declare Function WNetEnumResource Lib "mpr.dll" Alias "WNetEnumResourceA" (ByVal hEnum As Long, lpcCount As Long, lpBuffer As Any, lpBufferSize As Long) As Long
  12997. Declare Function WNetCloseEnum Lib "mpr.dll" Alias "WNetCloseEnum" (ByVal hEnum As Long) As Long
  12998.  
  12999. Declare Function WNetGetUser Lib "mpr.dll" Alias "WNetGetUserA" (ByVal lpName As String, ByVal lpUserName As String, lpnLength As Long) As Long
  13000. Declare Function WNetConnectionDialog Lib "mpr.dll" Alias "WNetConnectionDialog" (ByVal hwnd As Long, ByVal dwType As Long) As Long
  13001. Declare Function WNetDisconnectDialog Lib "mpr.dll" Alias "WNetDisconnectDialog" (ByVal hwnd As Long, ByVal dwType As Long) As Long
  13002.  
  13003. Declare Function WNetGetLastError Lib "mpr.dll" Alias "WNetGetLastErrorA" (lpError As Long, ByVal lpErrorBuf As String, ByVal nErrorBufSize As Long, ByVal lpNameBuf As String, ByVal nNameBufSize As Long) As Long
  13004.  
  13005. ' Status Codes
  13006.  
  13007. ' This section is provided for backward compatibility.  Use of the ERROR_
  13008. ' codes is preferred.  The WN_ error codes may not be available in future
  13009. ' releases.
  13010.  
  13011. ' General
  13012.  
  13013. Const WN_SUCCESS = NO_ERROR
  13014. Const WN_NOT_SUPPORTED = ERROR_NOT_SUPPORTED
  13015. Const WN_NET_ERROR = ERROR_UNEXP_NET_ERR
  13016. Const WN_MORE_DATA = ERROR_MORE_DATA
  13017. Const WN_BAD_POINTER = ERROR_INVALID_ADDRESS
  13018. Const WN_BAD_VALUE = ERROR_INVALID_PARAMETER
  13019. Const WN_BAD_PASSWORD = ERROR_INVALID_PASSWORD
  13020. Const WN_ACCESS_DENIED = ERROR_ACCESS_DENIED
  13021. Const WN_FUNCTION_BUSY = ERROR_BUSY
  13022. Const WN_WINDOWS_ERROR = ERROR_UNEXP_NET_ERR
  13023. Const WN_BAD_USER = ERROR_BAD_USERNAME
  13024. Const WN_OUT_OF_MEMORY = ERROR_NOT_ENOUGH_MEMORY
  13025. Const WN_NO_NETWORK = ERROR_NO_NETWORK
  13026. Const WN_EXTENDED_ERROR = ERROR_EXTENDED_ERROR
  13027.  
  13028. ' Connection
  13029.  
  13030. Const WN_NOT_CONNECTED = ERROR_NOT_CONNECTED
  13031. Const WN_OPEN_FILES = ERROR_OPEN_FILES
  13032. Const WN_DEVICE_IN_USE = ERROR_DEVICE_IN_USE
  13033. Const WN_BAD_NETNAME = ERROR_BAD_NET_NAME
  13034. Const WN_BAD_LOCALNAME = ERROR_BAD_DEVICE
  13035. Const WN_ALREADY_CONNECTED = ERROR_ALREADY_ASSIGNED
  13036. Const WN_DEVICE_ERROR = ERROR_GEN_FAILURE
  13037. Const WN_CONNECTION_CLOSED = ERROR_CONNECTION_UNAVAIL
  13038. Const WN_NO_NET_OR_BAD_PATH = ERROR_NO_NET_OR_BAD_PATH
  13039. Const WN_BAD_PROVIDER = ERROR_BAD_PROVIDER
  13040. Const WN_CANNOT_OPEN_PROFILE = ERROR_CANNOT_OPEN_PROFILE
  13041. Const WN_BAD_PROFILE = ERROR_BAD_PROFILE
  13042.  
  13043. ' Enumeration
  13044.  
  13045. Const WN_BAD_HANDLE = ERROR_INVALID_HANDLE
  13046. Const WN_NO_MORE_ENTRIES = ERROR_NO_MORE_ITEMS
  13047. Const WN_NOT_CONTAINER = ERROR_NOT_CONTAINER
  13048.  
  13049. Const WN_NO_ERROR = NO_ERROR
  13050.  
  13051. ' This section contains the definitions
  13052. ' for portable NetBIOS 3.0 support.
  13053.  
  13054. Const NCBNAMSZ = 16  '  absolute length of a net name
  13055. Const MAX_LANA = 254  '  lana's in range 0 to MAX_LANA
  13056.  
  13057. Type NCB
  13058.         ncb_command As Integer
  13059.         ncb_retcode As Integer
  13060.         ncb_lsn As Integer
  13061.         ncb_num As Integer
  13062.         ncb_buffer As String
  13063.         ncb_length As Integer
  13064.         ncb_callname As String * NCBNAMSZ
  13065.         ncb_name As String * NCBNAMSZ
  13066.         ncb_rto As Integer
  13067.         ncb_sto As Integer
  13068.         ncb_post As Long
  13069.         ncb_lana_num As Integer
  13070.         ncb_cmd_cplt As Integer
  13071.         ncb_reserve(10) As Byte    ' Reserved, must be 0
  13072.         ncb_event As Long
  13073. End Type
  13074.  
  13075. Type ADAPTER_STATUS
  13076.         adapter_address As String * 6
  13077.         rev_major As Integer
  13078.         reserved0 As Integer
  13079.         adapter_type As Integer
  13080.         rev_minor As Integer
  13081.         duration As Integer
  13082.         frmr_recv As Integer
  13083.         frmr_xmit As Integer
  13084.         iframe_recv_err As Integer
  13085.         xmit_aborts As Integer
  13086.         xmit_success As Long
  13087.         recv_success As Long
  13088.         iframe_xmit_err As Integer
  13089.         recv_buff_unavail As Integer
  13090.         t1_timeouts As Integer
  13091.         ti_timeouts As Integer
  13092.         Reserved1 As Long
  13093.         free_ncbs As Integer
  13094.         max_cfg_ncbs As Integer
  13095.         max_ncbs As Integer
  13096.         xmit_buf_unavail As Integer
  13097.         max_dgram_size As Integer
  13098.         pending_sess As Integer
  13099.         max_cfg_sess As Integer
  13100.         max_sess As Integer
  13101.         max_sess_pkt_size As Integer
  13102.         name_count As Integer
  13103. End Type
  13104.  
  13105. Type NAME_BUFFER
  13106.         name  As String * NCBNAMSZ
  13107.         name_num As Integer
  13108.         name_flags As Integer
  13109. End Type
  13110.  
  13111. ' values for name_flags bits.
  13112.  
  13113. Const NAME_FLAGS_MASK = &H87
  13114.  
  13115. Const GROUP_NAME = &H80
  13116. Const UNIQUE_NAME = &H0
  13117.  
  13118. Const REGISTERING = &H0
  13119. Const REGISTERED = &H4
  13120. Const DEREGISTERED = &H5
  13121. Const DUPLICATE = &H6
  13122. Const DUPLICATE_DEREG = &H7
  13123.  
  13124. Type SESSION_HEADER
  13125.         sess_name As Integer
  13126.         num_sess As Integer
  13127.         rcv_dg_outstanding As Integer
  13128.         rcv_any_outstanding As Integer
  13129. End Type
  13130.  
  13131. Type SESSION_BUFFER
  13132.         lsn As Integer
  13133.         State As Integer
  13134.         local_name As String * NCBNAMSZ
  13135.         remote_name As String * NCBNAMSZ
  13136.         rcvs_outstanding As Integer
  13137.         sends_outstanding As Integer
  13138. End Type
  13139.  
  13140. ' Values for state
  13141. Const LISTEN_OUTSTANDING = &H1
  13142. Const CALL_PENDING = &H2
  13143. Const SESSION_ESTABLISHED = &H3
  13144. Const HANGUP_PENDING = &H4
  13145. Const HANGUP_COMPLETE = &H5
  13146. Const SESSION_ABORTED = &H6
  13147.  
  13148. Type LANA_ENUM
  13149.         Length As Integer
  13150.         lana(MAX_LANA) As Integer
  13151. End Type
  13152.  
  13153. Type FIND_NAME_HEADER
  13154.         node_count As Integer
  13155.         Reserved As Integer
  13156.         unique_group As Integer
  13157. End Type
  13158.  
  13159. Type FIND_NAME_BUFFER
  13160.         Length As Integer
  13161.         access_control As Integer
  13162.         frame_control As Integer
  13163.         destination_addr(6) As Integer
  13164.         source_addr(6) As Integer
  13165.         routing_info(18) As Integer
  13166. End Type
  13167.  
  13168. Type ACTION_HEADER
  13169.         transport_id As Long
  13170.         action_code As Integer
  13171.         Reserved As Integer
  13172. End Type
  13173.  
  13174. ' Values for transport_id
  13175. Const ALL_TRANSPORTS = "M\0\0\0"
  13176. Const MS_NBF = "MNBF"
  13177.  
  13178. ' NCB Command codes
  13179. Const NCBCALL = &H10  '  NCB CALL
  13180. Const NCBLISTEN = &H11  '  NCB LISTEN
  13181. Const NCBHANGUP = &H12  '  NCB HANG UP
  13182. Const NCBSEND = &H14  '  NCB SEND
  13183. Const NCBRECV = &H15  '  NCB RECEIVE
  13184. Const NCBRECVANY = &H16  '  NCB RECEIVE ANY
  13185. Const NCBCHAINSEND = &H17  '  NCB CHAIN SEND
  13186. Const NCBDGSEND = &H20  '  NCB SEND DATAGRAM
  13187. Const NCBDGRECV = &H21  '  NCB RECEIVE DATAGRAM
  13188. Const NCBDGSENDBC = &H22  '  NCB SEND BROADCAST DATAGRAM
  13189. Const NCBDGRECVBC = &H23  '  NCB RECEIVE BROADCAST DATAGRAM
  13190. Const NCBADDNAME = &H30  '  NCB ADD NAME
  13191. Const NCBDELNAME = &H31  '  NCB DELETE NAME
  13192. Const NCBRESET = &H32  '  NCB RESET
  13193. Const NCBASTAT = &H33  '  NCB ADAPTER STATUS
  13194. Const NCBSSTAT = &H34  '  NCB SESSION STATUS
  13195. Const NCBCANCEL = &H35  '  NCB CANCEL
  13196. Const NCBADDGRNAME = &H36  '  NCB ADD GROUP NAME
  13197. Const NCBENUM = &H37  '  NCB ENUMERATE LANA NUMBERS
  13198. Const NCBUNLINK = &H70  '  NCB UNLINK
  13199. Const NCBSENDNA = &H71  '  NCB SEND NO ACK
  13200. Const NCBCHAINSENDNA = &H72  '  NCB CHAIN SEND NO ACK
  13201. Const NCBLANSTALERT = &H73  '  NCB LAN STATUS ALERT
  13202. Const NCBACTION = &H77  '  NCB ACTION
  13203. Const NCBFINDNAME = &H78  '  NCB FIND NAME
  13204. Const NCBTRACE = &H79  '  NCB TRACE
  13205.  
  13206. Const ASYNCH = &H80  '  high bit set == asynchronous
  13207.  
  13208. ' NCB Return codes
  13209. Const NRC_GOODRET = &H0   '  good return
  13210.                                 '  also returned when ASYNCH request accepted
  13211. Const NRC_BUFLEN = &H1   '  illegal buffer length
  13212. Const NRC_ILLCMD = &H3   '  illegal command
  13213. Const NRC_CMDTMO = &H5   '  command timed out
  13214. Const NRC_INCOMP = &H6   '  message incomplete, issue another command
  13215. Const NRC_BADDR = &H7   '  illegal buffer address
  13216. Const NRC_SNUMOUT = &H8   '  session number out of range
  13217. Const NRC_NORES = &H9   '  no resource available
  13218. Const NRC_SCLOSED = &HA   '  session closed
  13219. Const NRC_CMDCAN = &HB   '  command cancelled
  13220. Const NRC_DUPNAME = &HD   '  duplicate name
  13221. Const NRC_NAMTFUL = &HE   '  name table full
  13222. Const NRC_ACTSES = &HF   '  no deletions, name has active sessions
  13223. Const NRC_LOCTFUL = &H11  '  local session table full
  13224. Const NRC_REMTFUL = &H12  '  remote session table full
  13225. Const NRC_ILLNN = &H13  '  illegal name number
  13226. Const NRC_NOCALL = &H14  '  no callname
  13227. Const NRC_NOWILD = &H15  '  cannot put  in NCB_NAME
  13228. Const NRC_INUSE = &H16  '  name in use on remote adapter
  13229. Const NRC_NAMERR = &H17  '  name deleted
  13230. Const NRC_SABORT = &H18  '  session ended abnormally
  13231. Const NRC_NAMCONF = &H19  '  name conflict detected
  13232. Const NRC_IFBUSY = &H21  '  interface busy, IRET before retrying
  13233. Const NRC_TOOMANY = &H22  '  too many commands outstanding, retry later
  13234. Const NRC_BRIDGE = &H23  '  ncb_lana_num field invalid
  13235. Const NRC_CANOCCR = &H24  '  command completed while cancel occurring
  13236. Const NRC_CANCEL = &H26  '  command not valid to cancel
  13237. Const NRC_DUPENV = &H30  '  name defined by anther local process
  13238. Const NRC_ENVNOTDEF = &H34  '  environment undefined. RESET required
  13239. Const NRC_OSRESNOTAV = &H35  '  required OS resources exhausted
  13240. Const NRC_MAXAPPS = &H36  '  max number of applications exceeded
  13241. Const NRC_NOSAPS = &H37  '  no saps available for netbios
  13242. Const NRC_NORESOURCES = &H38  '  requested resources are not available
  13243. Const NRC_INVADDRESS = &H39  '  invalid ncb address or length > segment
  13244. Const NRC_INVDDID = &H3B  '  invalid NCB DDID
  13245. Const NRC_LOCKFAIL = &H3C  '  lock of user area failed
  13246. Const NRC_OPENERR = &H3F  '  NETBIOS not loaded
  13247. Const NRC_SYSTEM = &H40  '  system error
  13248.  
  13249. Const NRC_PENDING = &HFF  '  asynchronous command is not yet finished
  13250.  
  13251. '
  13252. ' Win32 NetAPIs.
  13253. '
  13254. Declare Function NetUserChangePassword Lib "Netapi32.dll" (Domain As Any, User As Any, OldPass As Byte, NewPass As Byte) As Long
  13255. Declare Function NetUserGetInfo Lib "Netapi32.dll" (lpServer As Any, UserName As Byte, ByVal Level As Long, lpBuffer As Long) As Long
  13256. Declare Function NetUserGetGroups Lib "Netapi32.dll" (lpServer As Any, UserName As Byte, ByVal Level As Long, lpBuffer As Long, ByVal PrefMaxLen As Long, lpEntriesRead As Long, lpTotalEntries As Long) As Long
  13257. Declare Function NetUserGetLocalGroups Lib "Netapi32.dll" (lpServer As Any, UserName As Byte, ByVal Level As Long, ByVal Flags As Long, lpBuffer As Long, ByVal MaxLen As Long, lpEntriesRead As Long, lpTotalEntries As Long) As Long
  13258. Declare Function NetUserAdd Lib "netapi32" (lpServer As Any, ByVal Level As Long, lpUser As USER_INFO_3_API, lpError As Long) As Long
  13259. Declare Function NetWkstaGetInfo Lib "Netapi32.dll" (lpServer As Any, ByVal Level As Long, lpBuffer As Any) As Long
  13260. Declare Function NetWkstaUserGetInfo Lib "Netapi32.dll" (ByVal reserved As Any, ByVal Level As Long, lpBuffer As Any) As Long
  13261. Declare Function NetApiBufferFree Lib "Netapi32.dll" (ByVal lpBuffer As Long) As Long
  13262. Declare Function NetRemoteTOD Lib "Netapi32.dll" (yServer As Any, pBuffer As Long) As Long
  13263. Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
  13264. Declare Function GetUserNameW Lib "advapi32.dll" (lpBuffer As Byte, nSize As Long) As Long
  13265. Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long
  13266. Declare Function GetComputerNameW Lib "kernel32" (lpBuffer As Any, nSize As Long) As Long
  13267. Declare Function GetCurrentProcess Lib "kernel32" () As Long
  13268. Declare Function OpenProcessToken Lib "advapi32.dll" (ByVal ProcessHandle As Long, ByVal DesiredAccess As Long, TokenHandle As Long) As Long
  13269. Declare Function GetTokenInformation Lib "advapi32.dll" (ByVal TokenHandle As Long, ByVal TokenInformationClass As Long, TokenInformation As Any, ByVal TokenInformationLength As Long, ReturnLength As Long) As Long
  13270. Declare Function LookupAccountSid Lib "advapi32.dll" Alias "LookupAccountSidW" (ByVal lpSystemName As Any, Sid As Any, Name As Any, cbName As Long, ReferencedDomainName As Any, cbReferencedDomainName As Long, peUse As Integer) As Long
  13271. Declare Function NetLocalGroupDelMembers Lib "netapi32.dll" (ByVal psServer As Long, ByVal psLocalGroup As Long, ByVal lLevel As Long, uMember As LOCALGROUP_MEMBERS_INFO_0, ByVal lMemberCount As Long) As Long
  13272. Declare Function NetLocalGroupGetMembers Lib "netapi32.dll" (ByVal psServer As Long, ByVal psLocalGroup As Long, ByVal lLevel As Long, pBuffer As Long, ByVal lMaxLength As Long, plEntriesRead As Long, plTotalEntries As Long, phResume As Long) As Long
  13273. Declare Function WNetAddConnection2 Lib "mpr.dll" Alias "WNetAddConnection2A" (lpNetResource As NETRESOURCE, ByVal lpPassword As String, ByVal lpUserName As String, ByVal dwFlags As Long) As Long
  13274. Declare Function WNetOpenEnum Lib "mpr.dll" Alias "WNetOpenEnumA" (ByVal dwScope As Long, ByVal dwType As Long, ByVal dwUsage As Long, lpNetResource As Any, lphEnum As Long) As Long
  13275. Declare Function WNetEnumResource Lib "mpr.dll" Alias "WNetEnumResourceA" (ByVal hEnum As Long, lpcCount As Long, lpBuffer As NETRESOURCE, lpBufferSize As Long) As Long
  13276. Declare Function WNetCloseEnum Lib "mpr.dll" (ByVal hEnum As Long) As Long
  13277. Declare Function Netbios Lib "netapi32.dll" Alias "Netbios" (pncb As NCB) As Byte
  13278. Type USER_INFO_3
  13279.    ' Level 0 starts here
  13280.    Name As Long
  13281.    ' Level 1 starts here
  13282.    Password As Long
  13283.    PasswordAge As Long
  13284.    Privilege As Long
  13285.    HomeDir As Long
  13286.    Comment As Long
  13287.    Flags As Long
  13288.    ScriptPath As Long
  13289.    ' Level 2 starts here
  13290.    AuthFlags As Long
  13291.    FullName As Long
  13292.    UserComment As Long
  13293.    Parms As Long
  13294.    Workstations As Long
  13295.    LastLogon As Long
  13296.    LastLogoff As Long
  13297.    AcctExpires As Long
  13298.    MaxStorage As Long
  13299.    UnitsPerWeek As Long
  13300.    LogonHours As Long
  13301.    BadPwCount As Long
  13302.    NumLogons As Long
  13303.    LogonServer As Long
  13304.    CountryCode As Long
  13305.    CodePage As Long
  13306.    ' Level 3 starts here
  13307.    UserID As Long
  13308.    PrimaryGroupID As Long
  13309.    Profile As Long
  13310.    HomeDirDrive As Long
  13311.    PasswordExpired As Long
  13312. End Type
  13313.  
  13314. Type GROUP_INFO_2
  13315.    Name As Long
  13316.    Comment As Long
  13317.    GroupID As Long
  13318.    Attributes As Long
  13319. End Type
  13320.  
  13321. Type LOCALGROUP_MEMBERS_INFO_0
  13322.    pSID As Long
  13323. End Type
  13324.  
  13325. Type LOCALGROUP_MEMBERS_INFO_1
  13326.    'Level 0 Starts Here
  13327.    pSID As Long
  13328.    'Level 1 Starts Here
  13329.    eUsage As g_netSID_NAME_USE
  13330.    psName As Long
  13331. End Type
  13332.  
  13333. Type WKSTA_INFO_102
  13334.    wki102_platform_id As Long
  13335.    wki102_computername As Long
  13336.    wki102_langroup As Long
  13337.    wki102_ver_major As Long
  13338.    wki102_ver_minor As Long
  13339.    wki102_lanroot As Long
  13340.    wki102_logged_on_users As Long
  13341. End Type
  13342.  
  13343. Type WKSTA_USER_INFO_1
  13344.    wkui1_username As Long
  13345.    wkui1_logon_domain As Long
  13346.    wkui1_oth_domains As Long
  13347.    wkui1_logon_server As Long
  13348. End Type
  13349.  
  13350. Type NETRESOURCE
  13351.     dwScope As Long
  13352.     dwType As Long
  13353.     dwDisplayType As Long
  13354.     dwUsage As Long
  13355.     pLocalName As Long
  13356.     pRemoteName As Long
  13357.     pComment As Long
  13358.     pProvider As Long
  13359. End Type
  13360.  
  13361. Enum g_netSID_NAME_USE
  13362.    SidTypeUser = 1&
  13363.    SidTypeGroup = 2&
  13364.    SidTypeDomain = 3&
  13365.    SidTypeAlias = 4&
  13366.    SidTypeWellKnownGroup = 5&
  13367.    SidTypeDeletedAccount = 6&
  13368.    SidTypeInvalid = 7&
  13369.    SidTypeUnknown = 8&
  13370. End Enum
  13371.  
  13372. Const FILTER_TEMP_DUPLICATE_ACCOUNT As Long = &H1&
  13373. Const FILTER_NORMAL_ACCOUNT As Long = &H2&
  13374. Const FILTER_PROXY_ACCOUNT As Long = &H4&
  13375. Const FILTER_INTERDOMAIN_TRUST_ACCOUNT As Long = &H8&
  13376. Const FILTER_WORKSTATION_TRUST_ACCOUNT As Long = &H10&
  13377. Const FILTER_SERVER_TRUST_ACCOUNT As Long = &H20&
  13378.  
  13379. Const TIMEQ_FOREVER = -1&             '((unsigned long) -1L)
  13380. Const USER_MAXSTORAGE_UNLIMITED = -1& '((unsigned long) -1L)
  13381. Const USER_NO_LOGOFF = -1&            '((unsigned long) -1L)
  13382. Const UNITS_PER_DAY = 24
  13383. Const UNITS_PER_WEEK = UNITS_PER_DAY * 7
  13384.  
  13385. Const USER_PRIV_MASK = 3
  13386. Const USER_PRIV_GUEST = 0
  13387. Const USER_PRIV_USER = 1
  13388. Const USER_PRIV_ADMIN = 2
  13389.  
  13390. Const UNLEN = 256         ' Maximum username length
  13391. Const GNLEN = UNLEN       ' Maximum groupname length
  13392. Const CNLEN = 15          ' Maximum computer name length
  13393. Const PWLEN = 256         ' Maximum password length
  13394. Const LM20_PWLEN = 14     ' LM 2.0 Maximum password length
  13395. Const MAXCOMMENTSZ = 256  ' Multipurpose comment length
  13396. Const LG_INCLUDE_INDIRECT As Long = &H1&
  13397.  
  13398. Const UF_SCRIPT = &H1
  13399. Const UF_ACCOUNTDISABLE = &H2
  13400. Const UF_HOMEDIR_REQUIRED = &H8
  13401. Const UF_LOCKOUT = &H10
  13402. Const UF_PASSWD_NOTREQD = &H20
  13403. Const UF_PASSWD_CANT_CHANGE = &H40
  13404.  
  13405. Const LG_INCLUDE_INDIRECT As Long = &H1&
  13406.  
  13407. Const NERR_Success As Long = 0&
  13408. Const NERR_BASE = 2100
  13409. Const NERR_InvalidComputer = (NERR_BASE + 251)
  13410. Const NERR_NotPrimary = (NERR_BASE + 126)
  13411. Const NERR_GroupExists = (NERR_BASE + 123)
  13412. Const NERR_UserExists = (NERR_BASE + 124)
  13413. Const NERR_PasswordTooShort = (NERR_BASE + 145)
  13414.  
  13415. Const RESOURCE_CONNECTED As Long = &H1&
  13416. Const RESOURCE_GLOBALNET As Long = &H2&
  13417. Const RESOURCE_REMEMBERED As Long = &H3&
  13418. Const RESOURCE_ENUM_ALL As Long = &HFFFF
  13419. Const RESOURCEDISPLAYTYPE_DOMAIN As Long = &H1&
  13420. Const RESOURCEDISPLAYTYPE_FILE As Long = &H4&
  13421. Const RESOURCEDISPLAYTYPE_GENERIC As Long = &H0&
  13422. Const RESOURCEDISPLAYTYPE_GROUP As Long = &H5&
  13423. Const RESOURCEDISPLAYTYPE_SERVER As Long = &H2&
  13424. Const RESOURCEDISPLAYTYPE_SHARE As Long = &H3&
  13425. Const RESOURCETYPE_ANY As Long = &H0&
  13426. Const RESOURCETYPE_DISK As Long = &H1&
  13427. Const RESOURCETYPE_PRINT As Long = &H2&
  13428. Const RESOURCETYPE_UNKNOWN As Long = &HFFFF&
  13429. Const RESOURCEUSAGE_ALL As Long = &H0&
  13430. Const RESOURCEUSAGE_CONNECTABLE As Long = &H1&
  13431. Const RESOURCEUSAGE_CONTAINER As Long = &H2&
  13432. Const RESOURCEUSAGE_RESERVED As Long = &H80000000
  13433.  
  13434. ' Legal values for expression in except().
  13435. Const EXCEPTION_EXECUTE_HANDLER = 1
  13436. Const EXCEPTION_CONTINUE_SEARCH = 0
  13437. Const EXCEPTION_CONTINUE_EXECUTION = -1
  13438.  
  13439. ' UI dialog constants and types
  13440.  
  13441. ' ----Constants--------------------------------------------------------------
  13442. Const ctlFirst = &H400
  13443. Const ctlLast = &H4FF
  13444.     '  Push buttons
  13445. Const psh1 = &H400
  13446. Const psh2 = &H401
  13447. Const psh3 = &H402
  13448. Const psh4 = &H403
  13449. Const psh5 = &H404
  13450. Const psh6 = &H405
  13451. Const psh7 = &H406
  13452. Const psh8 = &H407
  13453. Const psh9 = &H408
  13454. Const psh10 = &H409
  13455. Const psh11 = &H40A
  13456. Const psh12 = &H40B
  13457. Const psh13 = &H40C
  13458. Const psh14 = &H40D
  13459. Const psh15 = &H40E
  13460. Const pshHelp = psh15
  13461. Const psh16 = &H40F
  13462.     '  Checkboxes
  13463. Const chx1 = &H410
  13464. Const chx2 = &H411
  13465. Const chx3 = &H412
  13466. Const chx4 = &H413
  13467. Const chx5 = &H414
  13468. Const chx6 = &H415
  13469. Const chx7 = &H416
  13470. Const chx8 = &H417
  13471. Const chx9 = &H418
  13472. Const chx10 = &H419
  13473. Const chx11 = &H41A
  13474. Const chx12 = &H41B
  13475. Const chx13 = &H41C
  13476. Const chx14 = &H41D
  13477. Const chx15 = &H41E
  13478. Const chx16 = &H41D
  13479.     '  Radio buttons
  13480. Const rad1 = &H420
  13481. Const rad2 = &H421
  13482. Const rad3 = &H422
  13483. Const rad4 = &H423
  13484. Const rad5 = &H424
  13485. Const rad6 = &H425
  13486. Const rad7 = &H426
  13487. Const rad8 = &H427
  13488. Const rad9 = &H428
  13489. Const rad10 = &H429
  13490. Const rad11 = &H42A
  13491. Const rad12 = &H42B
  13492. Const rad13 = &H42C
  13493. Const rad14 = &H42D
  13494. Const rad15 = &H42E
  13495. Const rad16 = &H42F
  13496.     '  Groups, frames, rectangles, and icons
  13497. Const grp1 = &H430
  13498. Const grp2 = &H431
  13499. Const grp3 = &H432
  13500. Const grp4 = &H433
  13501. Const frm1 = &H434
  13502. Const frm2 = &H435
  13503. Const frm3 = &H436
  13504. Const frm4 = &H437
  13505. Const rct1 = &H438
  13506. Const rct2 = &H439
  13507. Const rct3 = &H43A
  13508. Const rct4 = &H43B
  13509. Const ico1 = &H43C
  13510. Const ico2 = &H43D
  13511. Const ico3 = &H43E
  13512. Const ico4 = &H43F
  13513.     '  Static text
  13514. Const stc1 = &H440
  13515. Const stc2 = &H441
  13516. Const stc3 = &H442
  13517. Const stc4 = &H443
  13518. Const stc5 = &H444
  13519. Const stc6 = &H445
  13520. Const stc7 = &H446
  13521. Const stc8 = &H447
  13522. Const stc9 = &H448
  13523. Const stc10 = &H449
  13524. Const stc11 = &H44A
  13525. Const stc12 = &H44B
  13526. Const stc13 = &H44C
  13527. Const stc14 = &H44D
  13528. Const stc15 = &H44E
  13529. Const stc16 = &H44F
  13530. Const stc17 = &H450
  13531. Const stc18 = &H451
  13532. Const stc19 = &H452
  13533. Const stc20 = &H453
  13534. Const stc21 = &H454
  13535. Const stc22 = &H455
  13536. Const stc23 = &H456
  13537. Const stc24 = &H457
  13538. Const stc25 = &H458
  13539. Const stc26 = &H459
  13540. Const stc27 = &H45A
  13541. Const stc28 = &H45B
  13542. Const stc29 = &H45C
  13543. Const stc30 = &H45D
  13544. Const stc31 = &H45E
  13545. Const stc32 = &H45F
  13546.     '  Listboxes
  13547. Const lst1 = &H460
  13548. Const lst2 = &H461
  13549. Const lst3 = &H462
  13550. Const lst4 = &H463
  13551. Const lst5 = &H464
  13552. Const lst6 = &H465
  13553. Const lst7 = &H466
  13554. Const lst8 = &H467
  13555. Const lst9 = &H468
  13556. Const lst10 = &H469
  13557. Const lst11 = &H46A
  13558. Const lst12 = &H46B
  13559. Const lst13 = &H46C
  13560. Const lst14 = &H46D
  13561. Const lst15 = &H46E
  13562. Const lst16 = &H46F
  13563.     '  Combo boxes
  13564. Const cmb1 = &H470
  13565. Const cmb2 = &H471
  13566. Const cmb3 = &H472
  13567. Const cmb4 = &H473
  13568. Const cmb5 = &H474
  13569. Const cmb6 = &H475
  13570. Const cmb7 = &H476
  13571. Const cmb8 = &H477
  13572. Const cmb9 = &H478
  13573. Const cmb10 = &H479
  13574. Const cmb11 = &H47A
  13575. Const cmb12 = &H47B
  13576. Const cmb13 = &H47C
  13577. Const cmb14 = &H47D
  13578. Const cmb15 = &H47E
  13579. Const cmb16 = &H47F
  13580.     '  Edit controls
  13581. Const edt1 = &H480
  13582. Const edt2 = &H481
  13583. Const edt3 = &H482
  13584. Const edt4 = &H483
  13585. Const edt5 = &H484
  13586. Const edt6 = &H485
  13587. Const edt7 = &H486
  13588. Const edt8 = &H487
  13589. Const edt9 = &H488
  13590. Const edt10 = &H489
  13591. Const edt11 = &H48A
  13592. Const edt12 = &H48B
  13593. Const edt13 = &H48C
  13594. Const edt14 = &H48D
  13595. Const edt15 = &H48E
  13596. Const edt16 = &H48F
  13597.     '  Scroll bars
  13598. Const scr1 = &H490
  13599. Const scr2 = &H491
  13600. Const scr3 = &H492
  13601. Const scr4 = &H493
  13602. Const scr5 = &H494
  13603. Const scr6 = &H495
  13604. Const scr7 = &H496
  13605. Const scr8 = &H497
  13606.  
  13607. Const FILEOPENORD = 1536
  13608. Const MULTIFILEOPENORD = 1537
  13609. Const PRINTDLGORD = 1538
  13610. Const PRNSETUPDLGORD = 1539
  13611. Const FINDDLGORD = 1540
  13612. Const REPLACEDLGORD = 1541
  13613. Const FONTDLGORD = 1542
  13614. Const FORMATDLGORD31 = 1543
  13615. Const FORMATDLGORD30 = 1544
  13616.  
  13617. Type CRGB
  13618.         bRed As Byte
  13619.         bGreen As Byte
  13620.         bBlue As Byte
  13621.         bExtra As Byte
  13622. End Type
  13623.  
  13624. ' -----------------
  13625. ' ADVAPI32
  13626. ' -----------------
  13627.  
  13628. ' function prototypes, constants, and type definitions
  13629. ' for Windows 32-bit Registry API
  13630.  
  13631. Const HKEY_CLASSES_ROOT = &H80000000
  13632. Const HKEY_CURRENT_USER = &H80000001
  13633. Const HKEY_LOCAL_MACHINE = &H80000002
  13634. Const HKEY_USERS = &H80000003
  13635. Const HKEY_PERFORMANCE_DATA = &H80000004
  13636. Const HKEY_CURRENT_CONFIG = &H80000005
  13637. Const HKEY_DYN_DATA = &H80000006
  13638.  
  13639. ' Registry API prototypes
  13640.  
  13641. Declare Function RegCloseKey Lib "advapi32.dll" Alias "RegCloseKey" (ByVal hKey As Long) As Long
  13642. Declare Function RegConnectRegistry Lib "advapi32.dll" Alias "RegConnectRegistryA" (ByVal lpMachineName As String, ByVal hKey As Long, phkResult As Long) As Long
  13643. Declare Function RegCreateKey Lib "advapi32.dll" Alias "RegCreateKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
  13644. Declare Function RegCreateKeyEx Lib "advapi32.dll" Alias "RegCreateKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal Reserved As Long, ByVal lpClass As String, ByVal dwOptions As Long, ByVal samDesired As Long, lpSecurityAttributes As SECURITY_ATTRIBUTES, phkResult As Long, lpdwDisposition As Long) As Long
  13645. Declare Function RegDeleteKey Lib "advapi32.dll" Alias "RegDeleteKeyA" (ByVal hKey As Long, ByVal lpSubKey As String) As Long
  13646. Declare Function RegDeleteValue Lib "advapi32.dll" Alias "RegDeleteValueA" (ByVal hKey As Long, ByVal lpValueName As String) As Long
  13647. Declare Function RegEnumKey Lib "advapi32.dll" Alias "RegEnumKeyA" (ByVal hKey As Long, ByVal dwIndex As Long, ByVal lpName As String, ByVal cbName As Long) As Long
  13648. Declare Function RegEnumKeyEx Lib "advapi32.dll" Alias "RegEnumKeyExA" (ByVal hKey As Long, ByVal dwIndex As Long, ByVal lpName As String, lpcbName As Long, ByVal lpReserved As Long, ByVal lpClass As String, lpcbClass As Long, lpftLastWriteTime As FILETIME) As Long
  13649. Declare Function RegEnumValue Lib "advapi32.dll" Alias "RegEnumValueA" (ByVal hKey As Long, ByVal dwIndex As Long, ByVal lpValueName As String, lpcbValueName As Long, ByVal lpReserved As Long, lpType As Long, lpData As Byte, lpcbData As Long) As Long
  13650. Declare Function RegFlushKey Lib "advapi32.dll" Alias "RegFlushKey" (ByVal hKey As Long) As Long
  13651. Declare Function RegGetKeySecurity Lib "advapi32.dll" Alias "RegGetKeySecurity" (ByVal hKey As Long, ByVal SecurityInformation As Long, pSecurityDescriptor As SECURITY_DESCRIPTOR, lpcbSecurityDescriptor As Long) As Long
  13652. Declare Function RegLoadKey Lib "advapi32.dll" Alias "RegLoadKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal lpFile As String) As Long
  13653. Declare Function RegNotifyChangeKeyValue Lib "advapi32.dll" Alias "RegNotifyChangeKeyValue" (ByVal hKey As Long, ByVal bWatchSubtree As Long, ByVal dwNotifyFilter As Long, ByVal hEvent As Long, ByVal fAsynchronus As Long) As Long
  13654. Declare Function RegOpenKey Lib "advapi32.dll" Alias "RegOpenKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
  13655. Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, phkResult As Long) As Long
  13656. Declare Function RegQueryInfoKey Lib "advapi32.dll" Alias "RegQueryInfoKeyA" (ByVal hKey As Long, ByVal lpClass As String, lpcbClass As Long, ByVal lpReserved As Long, lpcSubKeys As Long, lpcbMaxSubKeyLen As Long, lpcbMaxClassLen As Long, lpcValues As Long, lpcbMaxValueNameLen As Long, lpcbMaxValueLen As Long, lpcbSecurityDescriptor As Long, lpftLastWriteTime As FILETIME) As Long
  13657. Declare Function RegQueryValue Lib "advapi32.dll" Alias "RegQueryValueA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal lpValue As String, lpcbValue As Long) As Long
  13658. Declare Function RegQueryValueEx Lib "advapi32.dll" Alias "RegQueryValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal lpReserved As Long, lpType As Long, lpData As Any, lpcbData As Long) As Long         ' Note that if you declare the lpData parameter as String, you must pass it By Value. 
  13659. Declare Function RegReplaceKey Lib "advapi32.dll" Alias "RegReplaceKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal lpNewFile As String, ByVal lpOldFile As String) As Long
  13660. Declare Function RegRestoreKey Lib "advapi32.dll" Alias "RegRestoreKeyA" (ByVal hKey As Long, ByVal lpFile As String, ByVal dwFlags As Long) As Long
  13661. Declare Function RegSaveKey Lib "advapi32.dll" Alias "RegSaveKeyA" (ByVal hKey As Long, ByVal lpFile As String, lpSecurityAttributes As SECURITY_ATTRIBUTES) As Long
  13662. Declare Function RegSetKeySecurity Lib "advapi32.dll" Alias "RegSetKeySecurity" (ByVal hKey As Long, ByVal SecurityInformation As Long, pSecurityDescriptor As SECURITY_DESCRIPTOR) As Long
  13663. Declare Function RegSetValue Lib "advapi32.dll" Alias "RegSetValueA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal dwType As Long, ByVal lpData As String, ByVal cbData As Long) As Long
  13664. Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, lpData As Any, ByVal cbData As Long) As Long         ' Note that if you declare the lpData parameter as String, you must pass it By Value.
  13665. Declare Function RegUnLoadKey Lib "advapi32.dll" Alias "RegUnLoadKeyA" (ByVal hKey As Long, ByVal lpSubKey As String) As Long
  13666. Declare Function InitiateSystemShutdown Lib "advapi32.dll" Alias "InitiateSystemShutdownA" (ByVal lpMachineName As String, ByVal lpMessage As String, ByVal dwTimeout As Long, ByVal bForceAppsClosed As Long, ByVal bRebootAfterShutdown As Long) As Long
  13667. Declare Function AbortSystemShutdown Lib "advapi32.dll" Alias "AbortSystemShutdownA" (ByVal lpMachineName As String) As Long
  13668.  
  13669. ' Service database names
  13670. Const SERVICES_ACTIVE_DATABASE = "ServicesActive"
  13671. Const SERVICES_FAILED_DATABASE = "ServicesFailed"
  13672.  
  13673. ' Value to indicate no change to an optional parameter
  13674. Const SERVICE_NO_CHANGE = &HFFFF
  13675.  
  13676. ' Service State -- for Enum Requests (Bit Mask)
  13677. Const SERVICE_ACTIVE = &H1
  13678. Const SERVICE_INACTIVE = &H2
  13679. Const SERVICE_STATE_ALL = (SERVICE_ACTIVE Or SERVICE_INACTIVE)
  13680.  
  13681. ' Controls
  13682. Const SERVICE_CONTROL_STOP = &H1
  13683. Const SERVICE_CONTROL_PAUSE = &H2
  13684. Const SERVICE_CONTROL_CONTINUE = &H3
  13685. Const SERVICE_CONTROL_INTERROGATE = &H4
  13686. Const SERVICE_CONTROL_SHUTDOWN = &H5
  13687.  
  13688. ' Service State -- for CurrentState
  13689. Const SERVICE_STOPPED = &H1
  13690. Const SERVICE_START_PENDING = &H2
  13691. Const SERVICE_STOP_PENDING = &H3
  13692. Const SERVICE_RUNNING = &H4
  13693. Const SERVICE_CONTINUE_PENDING = &H5
  13694. Const SERVICE_PAUSE_PENDING = &H6
  13695. Const SERVICE_PAUSED = &H7
  13696.  
  13697. ' Controls Accepted  (Bit Mask)
  13698. Const SERVICE_ACCEPT_STOP = &H1
  13699. Const SERVICE_ACCEPT_PAUSE_CONTINUE = &H2
  13700. Const SERVICE_ACCEPT_SHUTDOWN = &H4
  13701.  
  13702. ' Service Control Manager object specific access types
  13703. Const SC_MANAGER_CONNECT = &H1
  13704. Const SC_MANAGER_CREATE_SERVICE = &H2
  13705. Const SC_MANAGER_ENUMERATE_SERVICE = &H4
  13706. Const SC_MANAGER_LOCK = &H8
  13707. Const SC_MANAGER_QUERY_LOCK_STATUS = &H10
  13708. Const SC_MANAGER_MODIFY_BOOT_CONFIG = &H20
  13709.  
  13710. Const SC_MANAGER_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED Or SC_MANAGER_CONNECT Or SC_MANAGER_CREATE_SERVICE Or SC_MANAGER_ENUMERATE_SERVICE Or SC_MANAGER_LOCK Or SC_MANAGER_QUERY_LOCK_STATUS Or SC_MANAGER_MODIFY_BOOT_CONFIG)
  13711.  
  13712. ' Service object specific access type
  13713. Const SERVICE_QUERY_CONFIG = &H1
  13714. Const SERVICE_CHANGE_CONFIG = &H2
  13715. Const SERVICE_QUERY_STATUS = &H4
  13716. Const SERVICE_ENUMERATE_DEPENDENTS = &H8
  13717. Const SERVICE_START = &H10
  13718. Const SERVICE_STOP = &H20
  13719. Const SERVICE_PAUSE_CONTINUE = &H40
  13720. Const SERVICE_INTERROGATE = &H80
  13721. Const SERVICE_USER_DEFINED_CONTROL = &H100
  13722.  
  13723. Const SERVICE_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED Or SERVICE_QUERY_CONFIG Or SERVICE_CHANGE_CONFIG Or SERVICE_QUERY_STATUS Or SERVICE_ENUMERATE_DEPENDENTS Or SERVICE_START Or SERVICE_STOP Or SERVICE_PAUSE_CONTINUE Or SERVICE_INTERROGATE Or SERVICE_USER_DEFINED_CONTROL)
  13724.  
  13725.  
  13726. Type SERVICE_STATUS
  13727.         dwServiceType As Long
  13728.         dwCurrentState As Long
  13729.         dwControlsAccepted As Long
  13730.         dwWin32ExitCode As Long
  13731.         dwServiceSpecificExitCode As Long
  13732.         dwCheckPoint As Long
  13733.         dwWaitHint As Long
  13734. End Type
  13735.  
  13736. Type ENUM_SERVICE_STATUS
  13737.         lpServiceName As String
  13738.         lpDisplayName As String
  13739.         ServiceStatus As SERVICE_STATUS
  13740. End Type
  13741.  
  13742. Type QUERY_SERVICE_LOCK_STATUS
  13743.         fIsLocked As Long
  13744.         lpLockOwner As String
  13745.         dwLockDuration As Long
  13746. End Type
  13747.  
  13748. Type QUERY_SERVICE_CONFIG
  13749.         dwServiceType As Long
  13750.         dwStartType As Long
  13751.         dwErrorControl As Long
  13752.         lpBinaryPathName As String
  13753.         lpLoadOrderGroup As String
  13754.         dwTagId As Long
  13755.         lpDependencies As String
  13756.         lpServiceStartName As String
  13757.         lpDisplayName As String
  13758. End Type
  13759.  
  13760. Type SERVICE_TABLE_ENTRY
  13761.         lpServiceName As String
  13762.         lpServiceProc As Long
  13763. End Type
  13764.  
  13765.  
  13766. ' ++ BUILD Version: 0010    '  Increment this if a change has global effects
  13767. ' Copyright (c) 1995  Microsoft Corporation
  13768. ' Module Name:
  13769. '     winsvc.h
  13770. ' Abstract:
  13771. '     Header file for the Service Control Manager
  13772. ' Environment:
  13773. '     User Mode - Win32
  13774. ' --*/
  13775. '
  13776. '  Constants
  13777.  
  13778. '  Character to designate that a name is a group
  13779. '
  13780. Const SC_GROUP_IDENTIFIER = "+"
  13781.  
  13782. '  Prototype for the Service Control Handler Function
  13783.  
  13784. ' /////////////////////////////////////////////////////////////////////////
  13785. '  API Function Prototypes
  13786. ' /////////////////////////////////////////////////////////////////////////
  13787.  
  13788. Declare Function ChangeServiceConfig Lib "advapi32.dll" Alias "ChangeServiceConfigA" (ByVal hService As Long, ByVal dwServiceType As Long, ByVal dwStartType As Long, ByVal dwErrorControl As Long, ByVal lpBinaryPathName As String, ByVal lpLoadOrderGroup As String, lpdwTagId As Long, ByVal lpDependencies As String, ByVal lpServiceStartName As String, ByVal lpPassword As String, ByVal lpDisplayName As String) As Long
  13789. Declare Function CloseServiceHandle Lib "advapi32.dll" Alias "CloseServiceHandle" (ByVal hSCObject As Long) As Long
  13790. Declare Function ControlService Lib "advapi32.dll" Alias "ControlService" (ByVal hService As Long, ByVal dwControl As Long, lpServiceStatus As SERVICE_STATUS) As Long
  13791. Declare Function CreateService Lib "advapi32.dll" Alias "CreateServiceA" (ByVal hSCManager As Long, ByVal lpServiceName As String, ByVal lpDisplayName As String, ByVal dwDesiredAccess As Long, ByVal dwServiceType As Long, ByVal dwStartType As Long, ByVal dwErrorControl As Long, ByVal lpBinaryPathName As String, ByVal lpLoadOrderGroup As String, lpdwTagId As Long, ByVal lpDependencies As String, ByVal lp As String, ByVal lpPassword As String) As Long
  13792. Declare Function DeleteService Lib "advapi32.dll" Alias "DeleteService" (ByVal hService As Long) As Long
  13793. Declare Function EnumDependentServices Lib "advapi32.dll" Alias "EnumDependentServicesA" (ByVal hService As Long, ByVal dwServiceState As Long, lpServices As ENUM_SERVICE_STATUS, ByVal cbBufSize As Long, pcbBytesNeeded As Long, lpServicesReturned As Long) As Long
  13794. Declare Function EnumServicesStatus Lib "advapi32.dll" Alias "EnumServicesStatusA" (ByVal hSCManager As Long, ByVal dwServiceType As Long, ByVal dwServiceState As Long, lpServices As ENUM_SERVICE_STATUS, ByVal cbBufSize As Long, pcbBytesNeeded As Long, lpServicesReturned As Long, lpResumeHandle As Long) As Long
  13795. Declare Function GetServiceKeyName Lib "advapi32.dll" Alias "GetServiceKeyNameA" (ByVal hSCManager As Long, ByVal lpDisplayName As String, ByVal lpServiceName As String, lpcchBuffer As Long) As Long
  13796. Declare Function GetServiceDisplayName Lib "advapi32.dll" Alias "GetServiceDisplayNameA" (ByVal hSCManager As Long, ByVal lpServiceName As String, ByVal lpDisplayName As String, lpcchBuffer As Long) As Long
  13797. Declare Function LockServiceDatabase Lib "advapi32.dll" Alias "LockServiceDatabase" (ByVal hSCManager As Long) As Long
  13798. Declare Function NotifyBootConfigStatus Lib "advapi32.dll" Alias "NotifyBootConfigStatus" (ByVal BootAcceptable As Long) As Long
  13799. Declare Function OpenSCManager Lib "advapi32.dll" Alias "OpenSCManagerA" (ByVal lpMachineName As String, ByVal lpDatabaseName As String, ByVal dwDesiredAccess As Long) As Long
  13800. Declare Function OpenService Lib "advapi32.dll" Alias "OpenServiceA" (ByVal hSCManager As Long, ByVal lpServiceName As String, ByVal dwDesiredAccess As Long) As Long
  13801. Declare Function QueryServiceConfig Lib "advapi32.dll" Alias "QueryServiceConfigA" (ByVal hService As Long, lpServiceConfig As QUERY_SERVICE_CONFIG, ByVal cbBufSize As Long, pcbBytesNeeded As Long) As Long
  13802. Declare Function QueryServiceLockStatus Lib "advapi32.dll" Alias "QueryServiceLockStatusA" (ByVal hSCManager As Long, lpLockStatus As QUERY_SERVICE_LOCK_STATUS, ByVal cbBufSize As Long, pcbBytesNeeded As Long) As Long
  13803. Declare Function QueryServiceObjectSecurity Lib "advapi32.dll" Alias "QueryServiceObjectSecurity" (ByVal hService As Long, ByVal dwSecurityInformation As Long, lpSecurityDescriptor As Any, ByVal cbBufSize As Long, pcbBytesNeeded As Long) As Long
  13804. Declare Function QueryServiceStatus Lib "advapi32.dll" Alias "QueryServiceStatus" (ByVal hService As Long, lpServiceStatus As SERVICE_STATUS) As Long
  13805. Declare Function RegisterServiceCtrlHandler Lib "advapi32.dll" Alias "RegisterServiceCtrlHandlerA" (ByVal lpServiceName As String, ByVal lpHandlerProc As Long) As Long
  13806. Declare Function SetServiceObjectSecurity Lib "advapi32.dll" Alias "SetServiceObjectSecurity" (ByVal hService As Long, ByVal dwSecurityInformation As Long, lpSecurityDescriptor As Any) As Long
  13807. Declare Function SetServiceStatus Lib "advapi32.dll" Alias "SetServiceStatus" (ByVal hServiceStatus As Long, lpServiceStatus As SERVICE_STATUS) As Long
  13808. Declare Function StartServiceCtrlDispatcher Lib "advapi32.dll" Alias "StartServiceCtrlDispatcherA" (lpServiceStartTable As SERVICE_TABLE_ENTRY) As Long
  13809. Declare Function StartService Lib "advapi32.dll" Alias "StartServiceA" (ByVal hService As Long, ByVal dwNumServiceArgs As Long, ByVal lpServiceArgVectors As Long) As Long
  13810. Declare Function UnlockServiceDatabase Lib "advapi32.dll" Alias "UnlockServiceDatabase" (ScLock As Any) As Long
  13811.  
  13812. Type LARGE_INTEGER
  13813.     lowpart As Long
  13814.     highpart As Long
  13815. End Type
  13816.     
  13817.  
  13818. ' Section for Performance Monitor data
  13819.  
  13820. Const PERF_DATA_VERSION = 1
  13821. Const PERF_DATA_REVISION = 1
  13822.  
  13823. Type PERF_DATA_BLOCK
  13824.         Signature As String * 4
  13825.         LittleEndian As Long
  13826.         Version As Long
  13827.         Revision As Long
  13828.         TotalByteLength As Long
  13829.         HeaderLength As Long
  13830.         NumObjectTypes As Long
  13831.         DefaultObject As Long
  13832.         SystemTime As SYSTEMTIME
  13833.         PerfTime As LARGE_INTEGER
  13834.         PerfFreq As LARGE_INTEGER
  13835.         PerTime100nSec As LARGE_INTEGER
  13836.         SystemNameLength As Long
  13837.         SystemNameOffset As Long
  13838. End Type
  13839.  
  13840. Type PERF_OBJECT_TYPE
  13841.         TotalByteLength As Long
  13842.         DefinitionLength As Long
  13843.         HeaderLength As Long
  13844.         ObjectNameTitleIndex As Long
  13845.         ObjectNameTitle As String
  13846.         ObjectHelpTitleIndex As Long
  13847.         ObjectHelpTitle As String
  13848.         DetailLevel As Long
  13849.         NumCounters As Long
  13850.         DefaultCounter As Long
  13851.         NumInstances As Long
  13852.         CodePage As Long
  13853.         PerfTime As LARGE_INTEGER
  13854.         PerfFreq As LARGE_INTEGER
  13855. End Type
  13856.  
  13857. Const PERF_NO_INSTANCES = -1  '  no instances
  13858.  
  13859. ' The counter type is the "or" of the following values as described below
  13860. '
  13861. ' select one of the following to indicate the counter's data size
  13862. Const PERF_SIZE_DWORD = &H0
  13863. Const PERF_SIZE_LARGE = &H100
  13864. Const PERF_SIZE_ZERO = &H200       '  for Zero Length fields
  13865. Const PERF_SIZE_VARIABLE_LEN = &H300       '  length is in CounterLength field of Counter Definition struct
  13866.  
  13867. ' select one of the following values to indicate the counter field usage
  13868. Const PERF_TYPE_NUMBER = &H0         '  a number (not a counter)
  13869. Const PERF_TYPE_COUNTER = &H400       '  an increasing numeric value
  13870. Const PERF_TYPE_TEXT = &H800       '  a text field
  13871. Const PERF_TYPE_ZERO = &HC00       '  displays a zero
  13872.  
  13873. ' If the PERF_TYPE_NUMBER field was selected, then select one of the
  13874. ' following to describe the Number
  13875. Const PERF_NUMBER_HEX = &H0         '  display as HEX value
  13876. Const PERF_NUMBER_DECIMAL = &H10000     '  display as a decimal integer
  13877. Const PERF_NUMBER_DEC_1000 = &H20000     '  display as a decimal/1000
  13878. '
  13879. ' If the PERF_TYPE_COUNTER value was selected then select one of the
  13880. ' following to indicate the type of counter
  13881. Const PERF_COUNTER_VALUE = &H0         '  display counter value
  13882. Const PERF_COUNTER_RATE = &H10000     '  divide ctr / delta time
  13883. Const PERF_COUNTER_FRACTION = &H20000     '  divide ctr / base
  13884. Const PERF_COUNTER_BASE = &H30000     '  base value used in fractions
  13885. Const PERF_COUNTER_ELAPSED = &H40000     '  subtract counter from current time
  13886. Const PERF_COUNTER_QUEUELEN = &H50000     '  Use Queuelen processing func.
  13887. Const PERF_COUNTER_HISTOGRAM = &H60000     '  Counter begins or ends a histogram
  13888.  
  13889. ' If the PERF_TYPE_TEXT value was selected, then select one of the
  13890. ' following to indicate the type of TEXT data.
  13891. Const PERF_TEXT_UNICODE = &H0         '  type of text in text field
  13892. Const PERF_TEXT_ASCII = &H10000     '  ASCII using the CodePage field
  13893.  
  13894. ' Timer SubTypes
  13895. Const PERF_TIMER_TICK = &H0         '  use system perf. freq for base
  13896. Const PERF_TIMER_100NS = &H100000    '  use 100 NS timer time base units
  13897. Const PERF_OBJECT_TIMER = &H200000    '  use the object timer freq
  13898.  
  13899. ' Any types that have calculations performed can use one or more of
  13900. ' the following calculation modification flags listed here
  13901. Const PERF_DELTA_COUNTER = &H400000    '  compute difference first
  13902. Const PERF_DELTA_BASE = &H800000    '  compute base diff as well
  13903. Const PERF_INVERSE_COUNTER = &H1000000   '  show as 1.00-value (assumes:
  13904. Const PERF_MULTI_COUNTER = &H2000000   '  sum of multiple instances
  13905.  
  13906. ' Select one of the following values to indicate the display suffix (if any)
  13907. Const PERF_DISPLAY_NO_SUFFIX = &H0         '  no suffix
  13908. Const PERF_DISPLAY_PER_SEC = &H10000000  '  "/sec"
  13909. Const PERF_DISPLAY_PERCENT = &H20000000  '  "%"
  13910. Const PERF_DISPLAY_SECONDS = &H30000000  '  "secs"
  13911. Const PERF_DISPLAY_NOSHOW = &H40000000  '  value is not displayed
  13912.  
  13913. ' Predefined counter types
  13914.  
  13915. ' 32-bit Counter.  Divide delta by delta time.  Display suffix: "/sec"
  13916. Const PERF_COUNTER_COUNTER = (PERF_SIZE_DWORD Or PERF_TYPE_COUNTER Or PERF_COUNTER_RATE Or PERF_TIMER_TICK Or PERF_DELTA_COUNTER Or PERF_DISPLAY_PER_SEC)
  13917.  
  13918. ' 64-bit Timer.  Divide delta by delta time.  Display suffix: "%"
  13919. Const PERF_COUNTER_TIMER = (PERF_SIZE_LARGE Or PERF_TYPE_COUNTER Or PERF_COUNTER_RATE Or PERF_TIMER_TICK Or PERF_DELTA_COUNTER Or PERF_DISPLAY_PERCENT)
  13920.  
  13921. ' Queue Length Space-Time Product. Divide delta by delta time. No Display Suffix.
  13922. Const PERF_COUNTER_QUEUELEN_TYPE = (PERF_SIZE_DWORD Or PERF_TYPE_COUNTER Or PERF_COUNTER_QUEUELEN Or PERF_TIMER_TICK Or PERF_DELTA_COUNTER Or PERF_DISPLAY_NO_SUFFIX)
  13923.  
  13924. ' 64-bit Counter.  Divide delta by delta time. Display Suffix: "/sec"
  13925. Const PERF_COUNTER_BULK_COUNT = (PERF_SIZE_LARGE Or PERF_TYPE_COUNTER Or PERF_COUNTER_RATE Or PERF_TIMER_TICK Or PERF_DELTA_COUNTER Or PERF_DISPLAY_PER_SEC)
  13926.  
  13927. ' Indicates the counter is not a  counter but rather Unicode text Display as text.
  13928. Const PERF_COUNTER_TEXT = (PERF_SIZE_VARIABLE_LEN Or PERF_TYPE_TEXT Or PERF_TEXT_UNICODE Or PERF_DISPLAY_NO_SUFFIX)
  13929.  
  13930. ' Indicates the data is a counter  which should not be
  13931. ' time averaged on display (such as an error counter on a serial line)
  13932. ' Display as is.  No Display Suffix.
  13933. Const PERF_COUNTER_RAWCOUNT = (PERF_SIZE_DWORD Or PERF_TYPE_NUMBER Or PERF_NUMBER_DECIMAL Or PERF_DISPLAY_NO_SUFFIX)
  13934.  
  13935. ' A count which is either 1 or 0 on each sampling interrupt (% busy)
  13936. ' Divide delta by delta base. Display Suffix: "%"
  13937. Const PERF_SAMPLE_FRACTION = (PERF_SIZE_DWORD Or PERF_TYPE_COUNTER Or PERF_COUNTER_FRACTION Or PERF_DELTA_COUNTER Or PERF_DELTA_BASE Or PERF_DISPLAY_PERCENT)
  13938.  
  13939. ' A count which is sampled on each sampling interrupt (queue length)
  13940. ' Divide delta by delta time. No Display Suffix.
  13941. Const PERF_SAMPLE_COUNTER = (PERF_SIZE_DWORD Or PERF_TYPE_COUNTER Or PERF_COUNTER_RATE Or PERF_TIMER_TICK Or PERF_DELTA_COUNTER Or PERF_DISPLAY_NO_SUFFIX)
  13942.  
  13943. ' A label: no data is associated with this counter (it has 0 length)
  13944. ' Do not display.
  13945. Const PERF_COUNTER_NODATA = (PERF_SIZE_ZERO Or PERF_DISPLAY_NOSHOW)
  13946.  
  13947. ' 64-bit Timer inverse (e.g., idle is measured, but display busy  As Integer)
  13948. ' Display 100 - delta divided by delta time.  Display suffix: "%"
  13949. Const PERF_COUNTER_TIMER_INV = (PERF_SIZE_LARGE Or PERF_TYPE_COUNTER Or PERF_COUNTER_RATE Or PERF_TIMER_TICK Or PERF_DELTA_COUNTER Or PERF_INVERSE_COUNTER Or PERF_DISPLAY_PERCENT)
  13950.  
  13951. ' The divisor for a sample, used with the previous counter to form a
  13952. ' sampled %.  You must check for >0 before dividing by this!  This
  13953. ' counter will directly follow the  numerator counter.  It should not
  13954. ' be displayed to the user.
  13955. Const PERF_SAMPLE_BASE = (PERF_SIZE_DWORD Or PERF_TYPE_COUNTER Or PERF_COUNTER_BASE Or PERF_DISPLAY_NOSHOW Or &H1)         '  for compatibility with pre-beta versions
  13956.  
  13957. ' A timer which, when divided by an average base, produces a time
  13958. ' in seconds which is the average time of some operation.  This
  13959. ' timer times total operations, and  the base is the number of opera-
  13960. ' tions.  Display Suffix: "sec"
  13961. Const PERF_AVERAGE_TIMER = (PERF_SIZE_DWORD Or PERF_TYPE_COUNTER Or PERF_COUNTER_FRACTION Or PERF_DISPLAY_SECONDS)
  13962.  
  13963. ' Used as the denominator in the computation of time or count
  13964. ' averages.  Must directly follow the numerator counter.  Not dis-
  13965. ' played to the user.
  13966. Const PERF_AVERAGE_BASE = (PERF_SIZE_DWORD Or PERF_TYPE_COUNTER Or PERF_COUNTER_BASE Or PERF_DISPLAY_NOSHOW Or &H2)         '  for compatibility with pre-beta versions
  13967.  
  13968. ' A bulk count which, when divided (typically) by the number of
  13969. ' operations, gives (typically) the number of bytes per operation.
  13970. ' No Display Suffix.
  13971. Const PERF_AVERAGE_BULK = (PERF_SIZE_LARGE Or PERF_TYPE_COUNTER Or PERF_COUNTER_FRACTION Or PERF_DISPLAY_NOSHOW)
  13972.  
  13973. ' 64-bit Timer in 100 nsec units. Display delta divided by
  13974. ' delta time.  Display suffix: "%"
  13975. Const PERF_100NSEC_TIMER = (PERF_SIZE_LARGE Or PERF_TYPE_COUNTER Or PERF_COUNTER_RATE Or PERF_TIMER_100NS Or PERF_DELTA_COUNTER Or PERF_DISPLAY_PERCENT)
  13976.  
  13977. ' 64-bit Timer inverse (e.g., idle is measured, but display busy  As Integer)
  13978. ' Display 100 - delta divided by delta time.  Display suffix: "%"
  13979. Const PERF_100NSEC_TIMER_INV = (PERF_SIZE_LARGE Or PERF_TYPE_COUNTER Or PERF_COUNTER_RATE Or PERF_TIMER_100NS Or PERF_DELTA_COUNTER Or PERF_INVERSE_COUNTER Or PERF_DISPLAY_PERCENT)
  13980.  
  13981. ' 64-bit Timer.  Divide delta by delta time.  Display suffix: "%"
  13982. ' Timer for multiple instances, so result can exceed 100%.
  13983. Const PERF_COUNTER_MULTI_TIMER = (PERF_SIZE_LARGE Or PERF_TYPE_COUNTER Or PERF_COUNTER_RATE Or PERF_DELTA_COUNTER Or PERF_TIMER_TICK Or PERF_MULTI_COUNTER Or PERF_DISPLAY_PERCENT)
  13984.  
  13985. ' 64-bit Timer inverse (e.g., idle is measured, but display busy  As Integer)
  13986. ' Display 100  _MULTI_BASE - delta divided by delta time.
  13987. ' Display suffix: "%" Timer for multiple instances, so result
  13988. ' can exceed 100%.  Followed by a counter of type _MULTI_BASE.
  13989. Const PERF_COUNTER_MULTI_TIMER_INV = (PERF_SIZE_LARGE Or PERF_TYPE_COUNTER Or PERF_COUNTER_RATE Or PERF_DELTA_COUNTER Or PERF_MULTI_COUNTER Or PERF_TIMER_TICK Or PERF_INVERSE_COUNTER Or PERF_DISPLAY_PERCENT)
  13990.  
  13991. ' Number of instances to which the preceding _MULTI_..._INV counter
  13992. ' applies.  Used as a factor to get the percentage.
  13993. Const PERF_COUNTER_MULTI_BASE = (PERF_SIZE_LARGE Or PERF_TYPE_COUNTER Or PERF_COUNTER_BASE Or PERF_MULTI_COUNTER Or PERF_DISPLAY_NOSHOW)
  13994.  
  13995. ' 64-bit Timer in 100 nsec units. Display delta divided by delta time.
  13996. ' Display suffix: "%" Timer for multiple instances, so result can exceed 100%.
  13997. Const PERF_100NSEC_MULTI_TIMER = (PERF_SIZE_LARGE Or PERF_TYPE_COUNTER Or PERF_DELTA_COUNTER Or PERF_COUNTER_RATE Or PERF_TIMER_100NS Or PERF_MULTI_COUNTER Or PERF_DISPLAY_PERCENT)
  13998.  
  13999. ' 64-bit Timer inverse (e.g., idle is measured, but display busy  As Integer)
  14000. ' Display 100  _MULTI_BASE - delta divided by delta time.
  14001. ' Display suffix: "%" Timer for multiple instances, so result
  14002. ' can exceed 100%.  Followed by a counter of type _MULTI_BASE.
  14003. Const PERF_100NSEC_MULTI_TIMER_INV = (PERF_SIZE_LARGE Or PERF_TYPE_COUNTER Or PERF_DELTA_COUNTER Or PERF_COUNTER_RATE Or PERF_TIMER_100NS Or PERF_MULTI_COUNTER Or PERF_INVERSE_COUNTER Or PERF_DISPLAY_PERCENT)
  14004.  
  14005. ' Indicates the data is a fraction of the following counter  which
  14006. ' should not be time averaged on display (such as free space over
  14007. ' total space.) Display as is.  Display the quotient as "%".
  14008. Const PERF_RAW_FRACTION = (PERF_SIZE_DWORD Or PERF_TYPE_COUNTER Or PERF_COUNTER_FRACTION Or PERF_DISPLAY_PERCENT)
  14009.  
  14010. ' Indicates the data is a base for the preceding counter which should
  14011. ' not be time averaged on display (such as free space over total space.)
  14012. Const PERF_RAW_BASE = (PERF_SIZE_DWORD Or PERF_TYPE_COUNTER Or PERF_COUNTER_BASE Or PERF_DISPLAY_NOSHOW Or &H3)         '  for compatibility with pre-beta versions
  14013.  
  14014. ' The data collected in this counter is actually the start time of the
  14015. ' item being measured. For display, this data is subtracted from the
  14016. ' sample time to yield the elapsed time as the difference between the two.
  14017. ' In the definition below, the PerfTime field of the Object contains
  14018. ' the sample time as indicated by the PERF_OBJECT_TIMER bit and the
  14019. ' difference is scaled by the PerfFreq of the Object to convert the time
  14020. ' units into seconds.
  14021. Const PERF_ELAPSED_TIME = (PERF_SIZE_LARGE Or PERF_TYPE_COUNTER Or PERF_COUNTER_ELAPSED Or PERF_OBJECT_TIMER Or PERF_DISPLAY_SECONDS)
  14022.  
  14023. ' The following counter type can be used with the preceding types to
  14024. ' define a range of values to be displayed in a histogram.
  14025. Const PERF_COUNTER_HISTOGRAM_TYPE = &H80000000  ' Counter begins or ends a histogram
  14026.  
  14027. ' The following are used to determine the level of detail associated
  14028. ' with the counter.  The user will be setting the level of detail
  14029. ' that should be displayed at any given time.
  14030. Const PERF_DETAIL_NOVICE = 100 '  The uninformed can understand it
  14031. Const PERF_DETAIL_ADVANCED = 200 '  For the advanced user
  14032. Const PERF_DETAIL_EXPERT = 300 '  For the expert user
  14033. Const PERF_DETAIL_WIZARD = 400 '  For the system designer
  14034.  
  14035. Type PERF_COUNTER_DEFINITION
  14036.         ByteLength As Long
  14037.         CounterNameTitleIndex As Long
  14038.         CounterNameTitle As String
  14039.         CounterHelpTitleIndex As Long
  14040.         CounterHelpTitle As String
  14041.         DefaultScale As Long
  14042.         DetailLevel As Long
  14043.         CounterType As Long
  14044.         CounterSize As Long
  14045.         CounterOffset As Long
  14046. End Type
  14047.  
  14048. Const PERF_NO_UNIQUE_ID = -1
  14049.  
  14050. Type PERF_INSTANCE_DEFINITION
  14051.         ByteLength As Long
  14052.         ParentObjectTitleIndex As Long
  14053.         ParentObjectInstance As Long
  14054.         UniqueID As Long
  14055.         NameOffset As Long
  14056.         NameLength As Long
  14057. End Type
  14058.  
  14059. Type PERF_COUNTER_BLOCK
  14060.         ByteLength As Long
  14061. End Type
  14062.  
  14063. Const CDERR_DIALOGFAILURE = &HFFFF
  14064.  
  14065. Const CDERR_GENERALCODES = &H0
  14066. Const CDERR_STRUCTSIZE = &H1
  14067. Const CDERR_INITIALIZATION = &H2
  14068. Const CDERR_NOTEMPLATE = &H3
  14069. Const CDERR_NOHINSTANCE = &H4
  14070. Const CDERR_LOADSTRFAILURE = &H5
  14071. Const CDERR_FINDRESFAILURE = &H6
  14072. Const CDERR_LOADRESFAILURE = &H7
  14073. Const CDERR_LOCKRESFAILURE = &H8
  14074. Const CDERR_MEMALLOCFAILURE = &H9
  14075. Const CDERR_MEMLOCKFAILURE = &HA
  14076. Const CDERR_NOHOOK = &HB
  14077. Const CDERR_REGISTERMSGFAIL = &HC
  14078.  
  14079. Const PDERR_PRINTERCODES = &H1000
  14080. Const PDERR_SETUPFAILURE = &H1001
  14081. Const PDERR_PARSEFAILURE = &H1002
  14082. Const PDERR_RETDEFFAILURE = &H1003
  14083. Const PDERR_LOADDRVFAILURE = &H1004
  14084. Const PDERR_GETDEVMODEFAIL = &H1005
  14085. Const PDERR_INITFAILURE = &H1006
  14086. Const PDERR_NODEVICES = &H1007
  14087. Const PDERR_NODEFAULTPRN = &H1008
  14088. Const PDERR_DNDMMISMATCH = &H1009
  14089. Const PDERR_CREATEICFAILURE = &H100A
  14090. Const PDERR_PRINTERNOTFOUND = &H100B
  14091. Const PDERR_DEFAULTDIFFERENT = &H100C
  14092.  
  14093. Const CFERR_CHOOSEFONTCODES = &H2000
  14094. Const CFERR_NOFONTS = &H2001
  14095. Const CFERR_MAXLESSTHANMIN = &H2002
  14096.  
  14097. Const FNERR_FILENAMECODES = &H3000
  14098. Const FNERR_SUBCLASSFAILURE = &H3001
  14099. Const FNERR_INVALIDFILENAME = &H3002
  14100. Const FNERR_BUFFERTOOSMALL = &H3003
  14101.  
  14102. Const FRERR_FINDREPLACECODES = &H4000
  14103. Const FRERR_BUFFERLENGTHZERO = &H4001
  14104.  
  14105. Const CCERR_CHOOSECOLORCODES = &H5000
  14106.  
  14107.  
  14108. ' Public interface to LZEXP?.LIB
  14109.  
  14110. '  LZEXPAND error return codes
  14111. Const LZERROR_BADINHANDLE = (-1)  '  invalid input handle
  14112. Const LZERROR_BADOUTHANDLE = (-2) '  invalid output handle
  14113. Const LZERROR_READ = (-3)         '  corrupt compressed file format
  14114. Const LZERROR_WRITE = (-4)        '  out of space for output file
  14115. Const LZERROR_PUBLICLOC = (-5)    '  insufficient memory for LZFile struct
  14116. Const LZERROR_GLOBLOCK = (-6)     '  bad Global handle
  14117. Const LZERROR_BADVALUE = (-7)     '  input parameter out of range
  14118. Const LZERROR_UNKNOWNALG = (-8)   '  compression algorithm not recognized
  14119.  
  14120. Declare Function LZCopy Lib "lz32.dll" Alias "LZCopy" (ByVal hfSource As Long, ByVal hfDest As Long) As Long
  14121. Declare Function LZInit Lib "lz32.dll" Alias "LZInit" (ByVal hfSrc As Long) As Long
  14122. Declare Function GetExpandedName Lib "lz32.dll" Alias "GetExpandedNameA" (ByVal lpszSource As String, ByVal lpszBuffer As String) As Long
  14123. Declare Function LZOpenFile Lib "lz32.dll" Alias "LZOpenFileA" (ByVal lpszFile As String, lpOf As OFSTRUCT, ByVal style As Long) As Long
  14124. Declare Function LZSeek Lib "lz32.dll" Alias "LZSeek" (ByVal hfFile As Long, ByVal lOffset As Long, ByVal nOrigin As Long) As Long
  14125. Declare Function LZRead Lib "lz32.dll" Alias "LZRead" (ByVal hfFile As Long, ByVal lpvBuf As String, ByVal cbread As Long) As Long
  14126. Declare Sub LZClose Lib "lz32.dll" Alias "LZClose" (ByVal hfFile As Long)
  14127.  
  14128. ' ********************************************************************
  14129. '       IMM.H - Input Method Manager definitions
  14130. '
  14131. '       Copyright (c) 1993-1995  Microsoft Corporation
  14132. ' ********************************************************************
  14133.  
  14134. Const VK_PROCESSKEY = &HE5
  14135.  
  14136. Type COMPOSITIONFORM
  14137.         dwStyle As Long
  14138.         ptCurrentPos As POINTAPI
  14139.         rcArea As Rect
  14140. End Type
  14141.  
  14142. Type CANDIDATEFORM
  14143.         dwIndex As Long
  14144.         dwStyle As Long
  14145.         ptCurrentPos As POINTAPI
  14146.         rcArea As Rect
  14147. End Type
  14148.  
  14149. Type CANDIDATELIST
  14150.         dwSize As Long
  14151.         dwStyle As Long
  14152.         dwCount As Long
  14153.         dwSelection As Long
  14154.         dwPageStart As Long
  14155.         dwPageSize As Long
  14156.         dwOffset(1) As Long
  14157. End Type
  14158.  
  14159. Const STYLE_DESCRIPTION_SIZE = 32
  14160.  
  14161. Type STYLEBUF
  14162.         dwStyle As Long
  14163.         szDescription As String * STYLE_DESCRIPTION_SIZE
  14164. End Type
  14165. '  prototype of IMM API
  14166.  
  14167. Declare Function ImmInstallIME Lib "imm32.dll" Alias "ImmInstallIMEA" (ByVal lpszIMEFileName As String, ByVal lpszLayoutText As String) As Long
  14168. Declare Function ImmGetDefaultIMEWnd Lib "imm32.dll" Alias "ImmGetDefaultIMEWnd" (ByVal hwnd As Long) As Long
  14169. Declare Function ImmGetDescription Lib "imm32.dll" Alias "ImmGetDescriptionA" (ByVal hkl As Long, ByVal lpsz As String, ByVal uBufLen As Long) As Long
  14170. Declare Function ImmGetIMEFileName Lib "imm32.dll" Alias "ImmGetIMEFileNameA" (ByVal hkl As Long, ByVal lpStr As String, ByVal uBufLen As Long) As Long
  14171. Declare Function ImmGetProperty Lib "imm32.dll" Alias "ImmGetProperty" (ByVal hkl As Long, ByVal dw As Long) As Long
  14172. Declare Function ImmIsIME Lib "imm32.dll" Alias "ImmIsIME" (ByVal hkl As Long) As Long
  14173. Declare Function ImmSimulateHotKey Lib "imm32.dll" Alias "ImmSimulateHotKey" (ByVal hwnd As Long, ByVal dw As Long) As Long
  14174. Declare Function ImmCreateContext Lib "imm32.dll" Alias "ImmCreateContext" () As Long
  14175. Declare Function ImmDestroyContext Lib "imm32.dll" Alias "ImmDestroyContext" (ByVal himc As Long) As Long
  14176. Declare Function ImmGetContext Lib "imm32.dll" Alias "ImmGetContext" (ByVal hwnd As Long) As Long
  14177. Declare Function ImmReleaseContext Lib "imm32.dll" Alias "ImmReleaseContext" (ByVal hwnd As Long, ByVal himc As Long) As Long
  14178. Declare Function ImmAssociateContext Lib "imm32.dll" Alias "ImmAssociateContext" (ByVal hwnd As Long, ByVal himc As Long) As Long
  14179. Declare Function ImmGetCompositionString Lib "imm32.dll" Alias "ImmGetCompositionStringA" (ByVal himc As Long, ByVal dw As Long, lpv As Any, ByVal dw2 As Long) As Long
  14180. Declare Function ImmSetCompositionString Lib "imm32.dll" Alias "ImmSetCompositionStringA" (ByVal himc As Long, ByVal dwIndex As Long, lpComp As Any, ByVal dw As Long, lpRead As Any, ByVal dw2 As Long) As Long
  14181. Declare Function ImmGetCandidateListCount Lib "imm32.dll" Alias "ImmGetCandidateListCountA" (ByVal himc As Long, lpdwListCount As Long) As Long
  14182. Declare Function ImmGetCandidateList Lib "imm32.dll" Alias "ImmGetCandidateListA" (ByVal himc As Long, ByVal deIndex As Long, lpCandidateList As CANDIDATELIST, ByVal dwBufLen As Long) As Long
  14183. Declare Function ImmGetGuideLine Lib "imm32.dll" Alias " ImmGetGuideLineA" (ByVal himc As Long, ByVal dwIndex As Long, ByVal lpStr As String, ByVal dwBufLen As Long) As Long
  14184. Declare Function ImmGetConversionStatus Lib "imm32.dll" Alias "ImmGetConversionStatus" (ByVal himc As Long, lpdw As Long, lpdw2 As Long) As Long
  14185. Declare Function ImmSetConversionStatus Lib "imm32.dll" Alias "ImmSetConversionStatus" (ByVal himc As Long, ByVal dw1 As Long, ByVal dw2 As Long) As Long
  14186. Declare Function ImmGetOpenStatus Lib "imm32.dll" Alias "ImmGetOpenStatus" (ByVal himc As Long) As Long
  14187. Declare Function ImmSetOpenStatus Lib "imm32.dll" Alias "ImmSetOpenStatus" (ByVal himc As Long, ByVal b As Long) As Long
  14188. Declare Function ImmGetCompositionFont Lib "imm32.dll" Alias "ImmGetCompositionFontA" (ByVal himc As Long, lpLogFont As LOGFONT) As Long
  14189. Declare Function ImmSetCompositionFont Lib "imm32.dll" Alias "ImmSetCompositionFontA" (ByVal himc As Long, lpLogFont As LOGFONT) As Long
  14190. Declare Function ImmConfigureIME Lib "imm32.dll" Alias "ImmConfigureIME" (ByVal hkl As Long, ByVal hwnd As Long, ByVal dw As Long) As Long
  14191. Declare Function ImmEscape Lib "imm32.dll" Alias "ImmEscapeA" (ByVal hkl As Long, ByVal himc As Long, ByVal un As Long, lpv As Any) As Long
  14192. Declare Function ImmGetConversionList Lib "imm32.dll" Alias "ImmGetConversionListA" (ByVal hkl As Long, ByVal himc As Long, ByVal lpsz As String, lpCandidateList As CANDIDATELIST, ByVal dwBufLen As Long, ByVal uFlag As Long) As Long
  14193. Declare Function ImmNotifyIME Lib "imm32.dll" Alias "ImmNotifyIME" (ByVal himc As Long, ByVal dwAction As Long, ByVal dwIndex As Long, ByVal dwValue As Long) As Long
  14194. Declare Function ImmGetStatusWindowPos Lib "imm32.dll" Alias "ImmGetStatusWindowPos" (ByVal himc As Long, lpPoint As POINTAPI) As Long
  14195. Declare Function ImmSetStatusWindowPos Lib "imm32.dll" Alias "ImmSetStatusWindowPos" (ByVal himc As Long, lpPoint As POINTAPI) As Long
  14196. Declare Function ImmGetCompositionWindow Lib "imm32.dll" Alias "ImmGetCompositionWindow" (ByVal himc As Long, lpCompositionForm As COMPOSITIONFORM) As Long
  14197. Declare Function ImmSetCompositionWindow Lib "imm32.dll" Alias "ImmSetCompositionWindow" (ByVal himc As Long, lpCompositionForm As COMPOSITIONFORM) As Long
  14198. Declare Function ImmGetCandidateWindow Lib "imm32.dll" Alias "ImmGetCandidateWindow" (ByVal himc As Long, ByVal dw As Long, lpCandidateForm As CANDIDATEFORM) As Long
  14199. Declare Function ImmSetCandidateWindow Lib "imm32.dll" Alias "ImmSetCandidateWindow" (ByVal himc As Long, lpCandidateForm As CANDIDATEFORM) As Long
  14200. Declare Function ImmIsUIMessage Lib "imm32.dll" Alias "ImmIsUIMessageA" (ByVal hwnd As Long, ByVal un As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
  14201. Declare Function ImmGetVirtualKey Lib "imm32.dll" Alias "ImmGetVirtualKey" (ByVal hwnd As Long) As Long
  14202. Declare Function ImmRegisterWord Lib "imm32.dll" Alias "ImmRegisterWordA" (ByVal hkl As Long, ByVal lpszReading As String, ByVal dw As Long, ByVal lpszRegister As String) As Long
  14203. Declare Function ImmUnregisterWord Lib "imm32.dll" Alias "ImmUnregisterWordA" (ByVal hkl As Long, ByVal lpszReading As String, ByVal dw As Long, ByVal lpszUnregister As String) As Long
  14204. Declare Function ImmGetRegisterWordStyle Lib "imm32.dll" Alias " ImmGetRegisterWordStyleA" (ByVal hkl As Long, ByVal nItem As Long, lpStyleBuf As STYLEBUF) As Long
  14205. Declare Function ImmEnumRegisterWord Lib "imm32.dll" Alias "ImmEnumRegisterWordA" (ByVal hkl As Long, ByVal RegisterWordEnumProc As Long, ByVal lpszReading As String, ByVal dw As Long, ByVal lpszRegister As String, lpv As Any) As Long
  14206. '  the IME related messages
  14207. Const WM_CONVERTREQUESTEX = &H108
  14208. Const WM_IME_STARTCOMPOSITION = &H10D
  14209. Const WM_IME_ENDCOMPOSITION = &H10E
  14210. Const WM_IME_COMPOSITION = &H10F
  14211. Const WM_IME_KEYLAST = &H10F
  14212.  
  14213. Const WM_IME_SETCONTEXT = &H281
  14214. Const WM_IME_NOTIFY = &H282
  14215. Const WM_IME_CONTROL = &H283
  14216. Const WM_IME_COMPOSITIONFULL = &H284
  14217. Const WM_IME_SELECT = &H285
  14218. Const WM_IME_CHAR = &H286
  14219.  
  14220. Const WM_IME_KEYDOWN = &H290
  14221. Const WM_IME_KEYUP = &H291
  14222.  
  14223. '  wParam for WM_IME_CONTROL
  14224. Const IMC_GETCANDIDATEPOS = &H7
  14225. Const IMC_SETCANDIDATEPOS = &H8
  14226. Const IMC_GETCOMPOSITIONFONT = &H9
  14227. Const IMC_SETCOMPOSITIONFONT = &HA
  14228. Const IMC_GETCOMPOSITIONWINDOW = &HB
  14229. Const IMC_SETCOMPOSITIONWINDOW = &HC
  14230. Const IMC_GETSTATUSWINDOWPOS = &HF
  14231. Const IMC_SETSTATUSWINDOWPOS = &H10
  14232. Const IMC_CLOSESTATUSWINDOW = &H21
  14233. Const IMC_OPENSTATUSWINDOW = &H22
  14234.  
  14235.  
  14236. '  wParam for WM_IME_CONTROL to the soft keyboard
  14237. '  dwAction for ImmNotifyIME
  14238. Const NI_OPENCANDIDATE = &H10
  14239. Const NI_CLOSECANDIDATE = &H11
  14240. Const NI_SELECTCANDIDATESTR = &H12
  14241. Const NI_CHANGECANDIDATELIST = &H13
  14242. Const NI_FINALIZECONVERSIONRESULT = &H14
  14243. Const NI_COMPOSITIONSTR = &H15
  14244. Const NI_SETCANDIDATE_PAGESTART = &H16
  14245. Const NI_SETCANDIDATE_PAGESIZE = &H17
  14246.  
  14247. '  lParam for WM_IME_SETCONTEXT
  14248. Const ISC_SHOWUICANDIDATEWINDOW = &H1
  14249. Const ISC_SHOWUICOMPOSITIONWINDOW = &H80000000
  14250. Const ISC_SHOWUIGUIDELINE = &H40000000
  14251. Const ISC_SHOWUIALLCANDIDATEWINDOW = &HF
  14252. Const ISC_SHOWUIALL = &HC000000F
  14253.  
  14254. '  dwIndex for ImmNotifyIME/NI_COMPOSITIONSTR
  14255. Const CPS_COMPLETE = &H1
  14256. Const CPS_CONVERT = &H2
  14257. Const CPS_REVERT = &H3
  14258. Const CPS_CANCEL = &H4
  14259.  
  14260. '  Windows for Simplified Chinese Edition hot key ID from 0x10 - 0x2F
  14261. Const IME_CHOTKEY_IME_NONIME_TOGGLE = &H10
  14262. Const IME_CHOTKEY_SHAPE_TOGGLE = &H11
  14263. Const IME_CHOTKEY_SYMBOL_TOGGLE = &H12
  14264.  
  14265. '  Windows for Japanese Edition hot key ID from 0x30 - 0x4F
  14266. Const IME_JHOTKEY_CLOSE_OPEN = &H30
  14267.  
  14268. '  Windows for Korean Edition hot key ID from 0x50 - 0x6F
  14269. Const IME_KHOTKEY_SHAPE_TOGGLE = &H50
  14270. Const IME_KHOTKEY_HANJACONVERT = &H51
  14271. Const IME_KHOTKEY_ENGLISH = &H52
  14272.  
  14273. '  Windows for Tranditional Chinese Edition hot key ID from 0x70 - 0x8F
  14274. Const IME_THOTKEY_IME_NONIME_TOGGLE = &H70
  14275. Const IME_THOTKEY_SHAPE_TOGGLE = &H71
  14276. Const IME_THOTKEY_SYMBOL_TOGGLE = &H72
  14277.  
  14278. '  direct switch hot key ID from 0x100 - 0x11F
  14279. Const IME_HOTKEY_DSWITCH_FIRST = &H100
  14280. Const IME_HOTKEY_DSWITCH_LAST = &H11F
  14281.  
  14282. '  IME private hot key from 0x200 - 0x21F
  14283. Const IME_ITHOTKEY_RESEND_RESULTSTR = &H200
  14284. Const IME_ITHOTKEY_PREVIOUS_COMPOSITION = &H201
  14285. Const IME_ITHOTKEY_UISTYLE_TOGGLE = &H202
  14286.  
  14287. '  parameter of ImmGetCompositionString
  14288. Const GCS_COMPREADSTR = &H1
  14289. Const GCS_COMPREADATTR = &H2
  14290. Const GCS_COMPREADCLAUSE = &H4
  14291. Const GCS_COMPSTR = &H8
  14292. Const GCS_COMPATTR = &H10
  14293. Const GCS_COMPCLAUSE = &H20
  14294. Const GCS_CURSORPOS = &H80
  14295. Const GCS_DELTASTART = &H100
  14296. Const GCS_RESULTREADSTR = &H200
  14297. Const GCS_RESULTREADCLAUSE = &H400
  14298. Const GCS_RESULTSTR = &H800
  14299. Const GCS_RESULTCLAUSE = &H1000
  14300.  
  14301. '  style bit flags for WM_IME_COMPOSITION
  14302. Const CS_INSERTCHAR = &H2000
  14303. Const CS_NOMOVECARET = &H4000
  14304.  
  14305. '  bits of fdwInit of INPUTCONTEXT
  14306. '  IME property bits
  14307. Const IME_PROP_AT_CARET = &H10000
  14308. Const IME_PROP_SPECIAL_UI = &H20000
  14309. Const IME_PROP_CANDLIST_START_FROM_1 = &H40000
  14310. Const IME_PROP_UNICODE = &H80000
  14311.  
  14312. '  IME UICapability bits
  14313. Const UI_CAP_2700 = &H1
  14314. Const UI_CAP_ROT90 = &H2
  14315. Const UI_CAP_ROTANY = &H4
  14316.  
  14317. '  ImmSetCompositionString Capability bits
  14318. Const SCS_CAP_COMPSTR = &H1
  14319. Const SCS_CAP_MAKEREAD = &H2
  14320.  
  14321. '  IME WM_IME_SELECT inheritance Capability bits
  14322. Const SELECT_CAP_CONVERSION = &H1
  14323. Const SELECT_CAP_SENTENCE = &H2
  14324.  
  14325. '  ID for deIndex of ImmGetGuideLine
  14326. Const GGL_LEVEL = &H1
  14327. Const GGL_INDEX = &H2
  14328. Const GGL_STRING = &H3
  14329. Const GGL_PRIVATE = &H4
  14330.  
  14331. '  ID for dwLevel of GUIDELINE Structure
  14332. Const GL_LEVEL_NOGUIDELINE = &H0
  14333. Const GL_LEVEL_FATAL = &H1
  14334. Const GL_LEVEL_ERROR = &H2
  14335. Const GL_LEVEL_WARNING = &H3
  14336. Const GL_LEVEL_INFORMATION = &H4
  14337.  
  14338. '  ID for dwIndex of GUIDELINE Structure
  14339. Const GL_ID_UNKNOWN = &H0
  14340. Const GL_ID_NOMODULE = &H1
  14341. Const GL_ID_NODICTIONARY = &H10
  14342. Const GL_ID_CANNOTSAVE = &H11
  14343. Const GL_ID_NOCONVERT = &H20
  14344. Const GL_ID_TYPINGERROR = &H21
  14345. Const GL_ID_TOOMANYSTROKE = &H22
  14346. Const GL_ID_READINGCONFLICT = &H23
  14347. Const GL_ID_INPUTREADING = &H24
  14348. Const GL_ID_INPUTRADICAL = &H25
  14349. Const GL_ID_INPUTCODE = &H26
  14350. Const GL_ID_INPUTSYMBOL = &H27
  14351. Const GL_ID_CHOOSECANDIDATE = &H28
  14352. Const GL_ID_REVERSECONVERSION = &H29
  14353. Const GL_ID_PRIVATE_FIRST = &H8000
  14354. Const GL_ID_PRIVATE_LAST = &HFFFF
  14355.  
  14356. '  ID for dwIndex of ImmGetProperty
  14357. Const IGP_PROPERTY = &H4
  14358. Const IGP_CONVERSION = &H8
  14359. Const IGP_SENTENCE = &HC
  14360. Const IGP_UI = &H10
  14361. Const IGP_SETCOMPSTR = &H14
  14362. Const IGP_SELECT = &H18
  14363.  
  14364. '  dwIndex for ImmSetCompositionString API
  14365. Const SCS_SETSTR = (GCS_COMPREADSTR Or GCS_COMPSTR)
  14366. Const SCS_CHANGEATTR = (GCS_COMPREADATTR Or GCS_COMPATTR)
  14367. Const SCS_CHANGECLAUSE = (GCS_COMPREADCLAUSE Or GCS_COMPCLAUSE)
  14368.  
  14369. '  attribute for COMPOSITIONSTRING Structure
  14370. Const ATTR_INPUT = &H0
  14371. Const ATTR_TARGET_CONVERTED = &H1
  14372. Const ATTR_CONVERTED = &H2
  14373. Const ATTR_TARGET_NOTCONVERTED = &H3
  14374. Const ATTR_INPUT_ERROR = &H4
  14375.  
  14376. '  bit field for IMC_SETCOMPOSITIONWINDOW, IMC_SETCANDIDATEWINDOW
  14377. Const CFS_DEFAULT = &H0
  14378. Const CFS_RECT = &H1
  14379. Const CFS_POINT = &H2
  14380. Const CFS_SCREEN = &H4
  14381. Const CFS_FORCE_POSITION = &H20
  14382. Const CFS_CANDIDATEPOS = &H40
  14383. Const CFS_EXCLUDE = &H80
  14384.  
  14385. '  conversion direction for ImmGetConversionList
  14386. Const GCL_CONVERSION = &H1
  14387. Const GCL_REVERSECONVERSION = &H2
  14388. Const GCL_REVERSE_LENGTH = &H3
  14389.  
  14390. '  bit field for conversion mode
  14391. Const IME_CMODE_ALPHANUMERIC = &H0
  14392. Const IME_CMODE_NATIVE = &H1
  14393. Const IME_CMODE_CHINESE = IME_CMODE_NATIVE
  14394. Const IME_CMODE_HANGEUL = IME_CMODE_NATIVE
  14395. Const IME_CMODE_JAPANESE = IME_CMODE_NATIVE
  14396. Const IME_CMODE_KATAKANA = &H2                   '  only effect under IME_CMODE_NATIVE
  14397. Const IME_CMODE_LANGUAGE = &H3
  14398. Const IME_CMODE_FULLSHAPE = &H8
  14399. Const IME_CMODE_ROMAN = &H10
  14400. Const IME_CMODE_CHARCODE = &H20
  14401. Const IME_CMODE_HANJACONVERT = &H40
  14402. Const IME_CMODE_SOFTKBD = &H80
  14403. Const IME_CMODE_NOCONVERSION = &H100
  14404. Const IME_CMODE_EUDC = &H200
  14405. Const IME_CMODE_SYMBOL = &H400
  14406.  
  14407. Const IME_SMODE_NONE = &H0
  14408. Const IME_SMODE_PLAURALCLAUSE = &H1
  14409. Const IME_SMODE_SINGLECONVERT = &H2
  14410. Const IME_SMODE_AUTOMATIC = &H4
  14411. Const IME_SMODE_PHRASEPREDICT = &H8
  14412.  
  14413. '  style of candidate
  14414. Const IME_CAND_UNKNOWN = &H0
  14415. Const IME_CAND_READ = &H1
  14416. Const IME_CAND_CODE = &H2
  14417. Const IME_CAND_MEANING = &H3
  14418. Const IME_CAND_RADICAL = &H4
  14419. Const IME_CAND_STROKE = &H5
  14420.  
  14421. '  wParam of report message WM_IME_NOTIFY
  14422. Const IMN_CLOSESTATUSWINDOW = &H1
  14423. Const IMN_OPENSTATUSWINDOW = &H2
  14424. Const IMN_CHANGECANDIDATE = &H3
  14425. Const IMN_CLOSECANDIDATE = &H4
  14426. Const IMN_OPENCANDIDATE = &H5
  14427. Const IMN_SETCONVERSIONMODE = &H6
  14428. Const IMN_SETSENTENCEMODE = &H7
  14429. Const IMN_SETOPENSTATUS = &H8
  14430. Const IMN_SETCANDIDATEPOS = &H9
  14431. Const IMN_SETCOMPOSITIONFONT = &HA
  14432. Const IMN_SETCOMPOSITIONWINDOW = &HB
  14433. Const IMN_SETSTATUSWINDOWPOS = &HC
  14434. Const IMN_GUIDELINE = &HD
  14435. Const IMN_PRIVATE = &HE
  14436.  
  14437. '  error code of ImmGetCompositionString
  14438. Const IMM_ERROR_NODATA = (-1)
  14439. Const IMM_ERROR_GENERAL = (-2)
  14440.  
  14441. '  dialog mode of ImmConfigureIME
  14442. Const IME_CONFIG_GENERAL = 1
  14443. Const IME_CONFIG_REGISTERWORD = 2
  14444. Const IME_CONFIG_SELECTDICTIONARY = 3
  14445.  
  14446. '  dialog mode of ImmEscape
  14447. Const IME_ESC_QUERY_SUPPORT = &H3
  14448. Const IME_ESC_RESERVED_FIRST = &H4
  14449. Const IME_ESC_RESERVED_LAST = &H7FF
  14450. Const IME_ESC_PRIVATE_FIRST = &H800
  14451. Const IME_ESC_PRIVATE_LAST = &HFFF
  14452. Const IME_ESC_SEQUENCE_TO_INTERNAL = &H1001
  14453. Const IME_ESC_GET_EUDC_DICTIONARY = &H1003
  14454. Const IME_ESC_SET_EUDC_DICTIONARY = &H1004
  14455. Const IME_ESC_MAX_KEY = &H1005
  14456. Const IME_ESC_IME_NAME = &H1006
  14457. Const IME_ESC_SYNC_HOTKEY = &H1007
  14458. Const IME_ESC_HANJA_MODE = &H1008
  14459.  
  14460. '  style of word registration
  14461. Const IME_REGWORD_STYLE_EUDC = &H1
  14462. Const IME_REGWORD_STYLE_USER_FIRST = &H80000000
  14463. Const IME_REGWORD_STYLE_USER_LAST = &HFFFF
  14464.  
  14465. '  type of soft keyboard
  14466. '  for Windows Tranditional Chinese Edition
  14467. Const SOFTKEYBOARD_TYPE_T1 = &H1
  14468. '  for Windows Simplified Chinese Edition
  14469. Const SOFTKEYBOARD_TYPE_C1 = &H2
  14470.  
  14471.  
  14472.  
  14473. ' ***********************************************************************
  14474. ' *                                                                       *
  14475. ' *   mcx.h -- This module defines the 32-Bit Windows MCX APIs            *
  14476. ' *                                                                       *
  14477. ' *   Copyright (c) 1990-1995, Microsoft Corp. All rights reserved.       *
  14478. ' *                                                                       *
  14479. ' ************************************************************************/
  14480.  
  14481.  
  14482. Type MODEMDEVCAPS
  14483.         dwActualSize As Long
  14484.         dwRequiredSize As Long
  14485.         dwDevSpecificOffset As Long
  14486.         dwDevSpecificSize As Long
  14487.  
  14488.     '  product and version identification
  14489.         dwModemProviderVersion As Long
  14490.         dwModemManufacturerOffset As Long
  14491.         dwModemManufacturerSize As Long
  14492.         dwModemModelOffset As Long
  14493.         dwModemModelSize As Long
  14494.         dwModemVersionOffset As Long
  14495.         dwModemVersionSize As Long
  14496.  
  14497.     '  local option capabilities
  14498.         dwDialOptions As Long          '  bitmap of supported values
  14499.         dwCallSetupFailTimer As Long   '  maximum in seconds
  14500.         dwInactivityTimeout As Long    '  maximum in seconds
  14501.         dwSpeakerVolume As Long        '  bitmap of supported values
  14502.         dwSpeakerMode As Long          '  bitmap of supported values
  14503.         dwModemOptions As Long         '  bitmap of supported values
  14504.         dwMaxDTERate As Long           '  maximum value in bit/s
  14505.         dwMaxDCERate As Long           '  maximum value in bit/s
  14506.  
  14507.     '  Variable portion for proprietary expansion
  14508.         abVariablePortion(1) As Byte
  14509. End Type
  14510.  
  14511. Type MODEMSETTINGS
  14512.         dwActualSize As Long
  14513.         dwRequiredSize As Long
  14514.         dwDevSpecificOffset As Long
  14515.         dwDevSpecificSize As Long
  14516.  
  14517.     '  static local options (read/write)
  14518.         dwCallSetupFailTimer As Long       '  seconds
  14519.         dwInactivityTimeout As Long        '  seconds
  14520.         dwSpeakerVolume As Long            '  level
  14521.         dwSpeakerMode As Long              '  mode
  14522.         dwPreferredModemOptions As Long    '  bitmap
  14523.     
  14524.     '  negotiated options (read only) for current or last call
  14525.         dwNegotiatedModemOptions As Long   '  bitmap
  14526.         dwNegotiatedDCERate As Long        '  bit/s
  14527.  
  14528.     '  Variable portion for proprietary expansion
  14529.         abVariablePortion(1) As Byte
  14530. End Type
  14531.  
  14532. '  Dial Options
  14533. Const DIALOPTION_BILLING = &H40          '  Supports wait for bong "$"
  14534. Const DIALOPTION_QUIET = &H80            '  Supports wait for quiet "@"
  14535. Const DIALOPTION_DIALTONE = &H100        '  Supports wait for dial tone "W"
  14536.  
  14537. '  SpeakerVolume for MODEMDEVCAPS
  14538. Const MDMVOLFLAG_LOW = &H1
  14539. Const MDMVOLFLAG_MEDIUM = &H2
  14540. Const MDMVOLFLAG_HIGH = &H4
  14541.  
  14542. '  SpeakerVolume for MODEMSETTINGS
  14543. Const MDMVOL_LOW = &H0
  14544. Const MDMVOL_MEDIUM = &H1
  14545. Const MDMVOL_HIGH = &H2
  14546.  
  14547. '  SpeakerMode for MODEMDEVCAPS
  14548. Const MDMSPKRFLAG_OFF = &H1
  14549. Const MDMSPKRFLAG_DIAL = &H2
  14550. Const MDMSPKRFLAG_ON = &H4
  14551. Const MDMSPKRFLAG_CALLSETUP = &H8
  14552.  
  14553. '  SpeakerMode for MODEMSETTINGS
  14554. Const MDMSPKR_OFF = &H0
  14555. Const MDMSPKR_DIAL = &H1
  14556. Const MDMSPKR_ON = &H2
  14557. Const MDMSPKR_CALLSETUP = &H3
  14558.  
  14559. '  Modem Options
  14560. Const MDM_COMPRESSION = &H1
  14561. Const MDM_ERROR_CONTROL = &H2
  14562. Const MDM_FORCED_EC = &H4
  14563. Const MDM_CELLULAR = &H8
  14564. Const MDM_FLOWCONTROL_HARD = &H10
  14565. Const MDM_FLOWCONTROL_SOFT = &H20
  14566. Const MDM_CCITT_OVERRIDE = &H40
  14567. Const MDM_SPEED_ADJUST = &H80
  14568. Const MDM_TONE_DIAL = &H100
  14569. Const MDM_BLIND_DIAL = &H200
  14570. Const MDM_V23_OVERRIDE = &H400
  14571.  
  14572.  
  14573.  
  14574. ' *****************************************************************************                                                                             *
  14575. ' * shellapi.h -  SHELL.DLL functions, types, and definitions                   *
  14576. ' *                                                                             *
  14577. ' * Copyright (c) 1992-1995, Microsoft Corp.  All rights reserved               *
  14578. ' *                                                                             *
  14579. ' \*****************************************************************************/
  14580.  
  14581. Declare Function DragQueryFile Lib "shell32.dll" Alias "DragQueryFileA" (ByVal HDROP As Long, ByVal UINT As Long, ByVal lpStr As String, ByVal ch As Long) As Long
  14582. Declare Function DragQueryPoint Lib "shell32.dll" Alias "DragQueryPoint" (ByVal HDROP As Long, lpPoint As POINTAPI) As Long
  14583. Declare Sub DragFinish Lib "shell32.dll" Alias "DragFinish" (ByVal hDrop As Long)
  14584. Declare Sub DragAcceptFiles Lib "shell32.dll" Alias "DragAcceptFiles" (ByVal hwnd As Long, ByVal fAccept As Long)
  14585. Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
  14586. Declare Function FindExecutable Lib "shell32.dll" Alias "FindExecutableA" (ByVal lpFile As String, ByVal lpDirectory As String, ByVal lpResult As String) As Long
  14587.  
  14588. Declare Function ShellAbout Lib "shell32.dll" Alias "ShellAboutA" (ByVal hwnd As Long, ByVal szApp As String, ByVal szOtherStuff As String, ByVal hIcon As Long) As Long
  14589. Declare Function DuplicateIcon Lib "shell32.dll" Alias "DuplicateIcon" (ByVal hInst As Long, ByVal hIcon As Long) As Long
  14590. Declare Function ExtractAssociatedIcon Lib "shell32.dll" Alias "ExtractAssociateIconA" (ByVal hInst As Long, ByVal lpIconPath As String, lpiIcon As Long) As Long
  14591. Declare Function ExtractIcon Lib "shell32.dll" Alias "ExtractIconA" (ByVal hInst As Long, ByVal lpszExeFileName As String, ByVal nIconIndex As Long) As Long
  14592.  
  14593. Type DRAGINFO
  14594.         uSize As Long                 '  init with sizeof(DRAGINFO)
  14595.         pt As POINTAPI
  14596.         fNC As Long
  14597.         lpFileList As String
  14598.         grfKeyState As Long
  14599. End Type
  14600.  
  14601. ' // AppBar stuff
  14602.  
  14603. Const ABM_NEW = &H0
  14604. Const ABM_REMOVE = &H1
  14605. Const ABM_QUERYPOS = &H2
  14606. Const ABM_SETPOS = &H3
  14607. Const ABM_GETSTATE = &H4
  14608. Const ABM_GETTASKBARPOS = &H5
  14609. Const ABM_ACTIVATE = &H6               '  lParam == TRUE/FALSE means activate/deactivate
  14610. Const ABM_GETAUTOHIDEBAR = &H7
  14611. Const ABM_SETAUTOHIDEBAR = &H8          '  this can fail at any time.  MUST check the result
  14612.                                         '  lParam = TRUE/FALSE  Set/Unset
  14613.                                         '  uEdge = what edge
  14614. Const ABM_WINDOWPOSCHANGED = &H9
  14615.  
  14616.  
  14617. '  these are put in the wparam of callback messages
  14618. Const ABN_STATECHANGE = &H0
  14619. Const ABN_POSCHANGED = &H1
  14620. Const ABN_FULLSCREENAPP = &H2
  14621. Const ABN_WINDOWARRANGE = &H3 '  lParam == TRUE means hide
  14622.  
  14623. '  flags for get state
  14624.  
  14625. Const ABS_AUTOHIDE = &H1
  14626. Const ABS_ALWAYSONTOP = &H2
  14627. Const ABE_LEFT = 0
  14628. Const ABE_TOP = 1
  14629. Const ABE_RIGHT = 2
  14630. Const ABE_BOTTOM = 3
  14631.  
  14632. Type APPBARDATA
  14633.         cbSize As Long
  14634.         hwnd As Long
  14635.         uCallbackMessage As Long
  14636.         uEdge As Long
  14637.         rc As Rect
  14638.         lParam As Long '  message specific
  14639. End Type
  14640.  
  14641. Declare Function SHAppBarMessage Lib "shell32.dll" Alias "SHAppBarMessage" (ByVal dwMessage As Long, pData As APPBARDATA) As Long
  14642.  
  14643. ' //  EndAppBar
  14644.  
  14645. Declare Function DoEnvironmentSubst Lib "shell32.dll" Alias "DoEnvironmentSubstA" (ByVal szString As String, ByVal cbString As Long) As Long
  14646. Declare Function FindEnvironmentString Lib "shell32.dll" Alias "FindEnvironmentStringA" (ByVal szEnvVar As String) As String
  14647.  
  14648. Const EIRESID = -1
  14649.  
  14650. Declare Function ExtractIconEx Lib "shell32.dll" Alias "ExtractIconExA" (ByVal lpszFile As String, ByVal nIconIndex As Long, phiconLarge As Long, phiconSmall As Long, ByVal nIcons As Long) As Long
  14651.  
  14652. ' // Shell File Operations
  14653.  
  14654. Const FO_MOVE = &H1
  14655. Const FO_COPY = &H2
  14656. Const FO_DELETE = &H3
  14657. Const FO_RENAME = &H4
  14658. Const FOF_MULTIDESTFILES = &H1
  14659. Const FOF_CONFIRMMOUSE = &H2
  14660. Const FOF_SILENT = &H4                      '  don't create progress/report
  14661. Const FOF_RENAMEONCOLLISION = &H8
  14662. Const FOF_NOCONFIRMATION = &H10             '  Don't prompt the user.
  14663. Const FOF_WANTMAPPINGHANDLE = &H20          '  Fill in SHFILEOPSTRUCT.hNameMappings
  14664.                                       '  Must be freed using SHFreeNameMappings
  14665. Const FOF_ALLOWUNDO = &H40
  14666. Const FOF_FILESONLY = &H80                  '  on *.*, do only files
  14667. Const FOF_SIMPLEPROGRESS = &H100            '  means don't show names of files
  14668. Const FOF_NOCONFIRMMKDIR = &H200            '  don't confirm making any needed dirs
  14669.  
  14670. Const PO_DELETE = &H13           '  printer is being deleted
  14671. Const PO_RENAME = &H14           '  printer is being renamed
  14672. Const PO_PORTCHANGE = &H20       '  port this printer connected to is being changed
  14673.                                 '  if this id is set, the strings received by
  14674.                                 '  the copyhook are a doubly-null terminated
  14675.                                 '  list of strings.  The first is the printer
  14676.                                 '  name and the second is the printer port.
  14677. Const PO_REN_PORT = &H34         '  PO_RENAME and PO_PORTCHANGE at same time.
  14678.  
  14679. '  no POF_ flags currently defined
  14680.  
  14681. '  implicit parameters are:
  14682. '       if pFrom or pTo are unqualified names the current directories are
  14683. '       taken from the global current drive/directory settings managed
  14684. '       by Get/SetCurrentDrive/Directory
  14685. '
  14686. '       the global confirmation settings
  14687.  
  14688. Type SHFILEOPSTRUCT
  14689.         hwnd As Long
  14690.         wFunc As Long
  14691.         pFrom As String
  14692.         pTo As String
  14693.         fFlags As Integer
  14694.         fAnyOperationsAborted As Long
  14695.         hNameMappings As Long
  14696.         lpszProgressTitle As String '  only used if FOF_SIMPLEPROGRESS
  14697. End Type
  14698.  
  14699. Declare Function SHFileOperation Lib "shell32.dll" Alias " SHFileOperationA" (lpFileOp As SHFILEOPSTRUCT) As Long
  14700.  
  14701. Declare Sub SHFreeNameMappings Lib "shell32.dll" Alias "SHFreeNameMappings" (ByVal hNameMappings As Long)
  14702.  
  14703. Type SHNAMEMAPPING
  14704.         pszOldPath As String
  14705.         pszNewPath As String
  14706.         cchOldPath As Long
  14707.         cchNewPath As Long
  14708. End Type
  14709.  
  14710. ' // End Shell File Operations
  14711.  
  14712. ' //  Begin ShellExecuteEx and family
  14713.  
  14714. '  ShellExecute() and ShellExecuteEx() error codes
  14715.  
  14716. '  regular WinExec() codes
  14717. Const SE_ERR_FNF = 2                     '  file not found
  14718. Const SE_ERR_PNF = 3                     '  path not found
  14719. Const SE_ERR_ACCESSDENIED = 5            '  access denied
  14720. Const SE_ERR_OOM = 8                     '  out of memory
  14721. Const SE_ERR_DLLNOTFOUND = 32
  14722.  
  14723.  
  14724. '  Note CLASSKEY overrides CLASSNAME
  14725. Const SEE_MASK_CLASSNAME = &H1
  14726. Const SEE_MASK_CLASSKEY = &H3
  14727. '  Note INVOKEIDLIST overrides IDLIST
  14728. Const SEE_MASK_IDLIST = &H4
  14729. Const SEE_MASK_INVOKEIDLIST = &HC
  14730. Const SEE_MASK_ICON = &H10
  14731. Const SEE_MASK_HOTKEY = &H20
  14732. Const SEE_MASK_NOCLOSEPROCESS = &H40
  14733. Const SEE_MASK_CONNECTNETDRV = &H80
  14734. Const SEE_MASK_FLAG_DDEWAIT = &H100
  14735. Const SEE_MASK_DOENVSUBST = &H200
  14736. Const SEE_MASK_FLAG_NO_UI = &H400
  14737.  
  14738. Type SHELLEXECUTEINFO
  14739.         cbSize As Long
  14740.         fMask As Long
  14741.         hwnd As Long
  14742.         lpVerb As String
  14743.         lpFile As String
  14744.         lpParameters As String
  14745.         lpDirectory As String
  14746.         nShow As Long
  14747.         hInstApp As Long
  14748.         '  Optional fields
  14749.         lpIDList As Long
  14750.         lpClass As String
  14751.         hkeyClass As Long
  14752.         dwHotKey As Long
  14753.         hIcon As Long
  14754.         hProcess As Long
  14755. End Type
  14756.  
  14757. Declare Sub WinExecError Lib "shell32.dll" Alias "WinExecErrorA" (ByVal hwnd As Long, ByVal error As Long, ByVal lpstrFileName As String, ByVal lpstrTitle As String)
  14758.  
  14759. ' //  End ShellExecuteEx and family
  14760.  
  14761. ' // Tray notification definitions
  14762.  
  14763. Type NOTIFYICONDATA
  14764.         cbSize As Long
  14765.         hwnd As Long
  14766.         uID As Long
  14767.         uFlags As Long
  14768.         uCallbackMessage As Long
  14769.         hIcon As Long
  14770.         szTip As String * 64
  14771. End Type
  14772.  
  14773. Const NIM_ADD = &H0
  14774. Const NIM_MODIFY = &H1
  14775. Const NIM_DELETE = &H2
  14776.  
  14777. Const NIF_MESSAGE = &H1
  14778. Const NIF_ICON = &H2
  14779. Const NIF_TIP = &H4
  14780.  
  14781. Declare Function Shell_NotifyIcon Lib "shell32.dll" Alias " Shell_NotifyIconA" (ByVal dwMessage As Long, lpData As NOTIFYICONDATA) As Long
  14782.  
  14783. ' // End Tray Notification Icons
  14784.  
  14785. ' // Begin SHGetFileInfo
  14786.  
  14787. '  * The SHGetFileInfo API provides an easy way to get attributes
  14788. '  * for a file given a pathname.
  14789. '  *
  14790. '  *   PARAMETERS
  14791. '  *
  14792. '  *     pszPath              file name to get info about
  14793. '  *     dwFileAttributes     file attribs, only used with SHGFI_USEFILEATTRIBUTES
  14794. '  *     psfi                 place to return file info
  14795. '  *     cbFileInfo           size of structure
  14796. '  *     uFlags               flags
  14797. '  *
  14798. '  *   RETURN
  14799. '  *     TRUE if things worked
  14800. '  */
  14801.  
  14802. Type SHFILEINFO
  14803.         hIcon As Long                      '  out: icon
  14804.         iIcon As Long          '  out: icon index
  14805.         dwAttributes As Long               '  out: SFGAO_ flags
  14806.         szDisplayName As String * MAX_PATH '  out: display name (or path)
  14807.         szTypeName As String * 80         '  out: type name
  14808. End Type
  14809.  
  14810. Const SHGFI_ICON = &H100                         '  get icon
  14811. Const SHGFI_DISPLAYNAME = &H200                  '  get display name
  14812. Const SHGFI_TYPENAME = &H400                     '  get type name
  14813. Const SHGFI_ATTRIBUTES = &H800                   '  get attributes
  14814. Const SHGFI_ICONLOCATION = &H1000                '  get icon location
  14815. Const SHGFI_EXETYPE = &H2000                     '  return exe type
  14816. Const SHGFI_SYSICONINDEX = &H4000                '  get system icon index
  14817. Const SHGFI_LINKOVERLAY = &H8000                 '  put a link overlay on icon
  14818. Const SHGFI_SELECTED = &H10000                   '  show icon in selected state
  14819. Const SHGFI_LARGEICON = &H0                      '  get large icon
  14820. Const SHGFI_SMALLICON = &H1                      '  get small icon
  14821. Const SHGFI_OPENICON = &H2                       '  get open icon
  14822. Const SHGFI_SHELLICONSIZE = &H4                  '  get shell size icon
  14823. Const SHGFI_PIDL = &H8                           '  pszPath is a pidl
  14824. Const SHGFI_USEFILEATTRIBUTES = &H10             '  use passed dwFileAttribute
  14825.  
  14826. Declare Function SHGetFileInfo Lib "shell32.dll" Alias "SHGetFileInfoA" (ByVal pszPath As String, ByVal dwFileAttributes As Long, psfi As SHFILEINFO, ByVal cbFileInfo As Long, ByVal uFlags As Long) As Long
  14827.  
  14828. Declare Function SHGetNewLinkInfo Lib "shell32.dll" Alias "SHGetNewLinkInfoA" (ByVal pszLinkto As String, ByVal pszDir As String, ByVal pszName As String, pfMustCopy As Long, ByVal uFlags As Long) As Long
  14829.  
  14830. Const SHGNLI_PIDL = &H1                          '  pszLinkTo is a pidl
  14831. Const SHGNLI_PREFIXNAME = &H2                    '  Make name "Shortcut to xxx"
  14832.  
  14833. ' // End SHGetFileInfo
  14834.  
  14835.  
  14836. ' Copyright (C) 1993 - 1995 Microsoft Corporation
  14837.  
  14838. ' Module Name:
  14839.  
  14840. '     winperf.h
  14841.  
  14842. ' Abstract:
  14843.  
  14844. '     Header file for the Performance Monitor data.
  14845.  
  14846. '     This file contains the definitions of the data structures returned
  14847. '     by the Configuration Registry in response to a request for
  14848. '     performance data.  This file is used by both the Configuration
  14849. '     Registry and the Performance Monitor to define their interface.
  14850. '     The complete interface is described here, except for the name
  14851. '     of the node to query in the registry.  It is
  14852.  
  14853. '                    HKEY_PERFORMANCE_DATA.
  14854.  
  14855. '     By querying that node with a subkey of "Global" the caller will
  14856. '     retrieve the structures described here.
  14857.  
  14858. '     There is no need to RegOpenKey() the reserved handle HKEY_PERFORMANCE_DATA,
  14859. '     but the caller should RegCloseKey() the handle so that network transports
  14860. '     and drivers can be removed or installed (which cannot happen while
  14861. '     they are open for monitoring.)  Remote requests must first
  14862. '     RegConnectRegistry().
  14863.  
  14864. ' --*/
  14865.  
  14866. '   Data structure definitions.
  14867.  
  14868. '   In order for data to be returned through the Configuration Registry
  14869. '   in a system-independent fashion, it must be self-describing.
  14870.  
  14871. '   In the following, all offsets are in bytes.
  14872.  
  14873. '
  14874. '   Data is returned through the Configuration Registry in a
  14875. '   a data block which begins with a _PERF_DATA_BLOCK structure.
  14876. '
  14877.  
  14878. '   The _PERF_DATA_BLOCK structure is followed by NumObjectTypes of
  14879. '   data sections, one for each type of object measured.  Each object
  14880. '   type section begins with a _PERF_OBJECT_TYPE structure.
  14881.  
  14882.  
  14883. ' *****************************************************************************                                                                             *
  14884. ' * winver.h -    Version management functions, types, and definitions          *
  14885. ' *                                                                             *
  14886. ' *               Include file for VER.DLL.  This library is                    *
  14887. ' *               designed to allow version stamping of Windows executable files*
  14888. ' *               and of special .VER files for DOS executable files.           *
  14889. ' *                                                                             *
  14890. ' *               Copyright (c) 1993, Microsoft Corp.  All rights reserved      *
  14891. ' *                                                                             *
  14892. ' \*****************************************************************************/
  14893.  
  14894. '  ----- Symbols -----
  14895. Const VS_VERSION_INFO = 1
  14896. Const VS_USER_DEFINED = 100
  14897.  
  14898. '  ----- VS_VERSION.dwFileFlags -----
  14899. Const VS_FFI_SIGNATURE = &HFEEF04BD
  14900. Const VS_FFI_STRUCVERSION = &H10000
  14901. Const VS_FFI_FILEFLAGSMASK = &H3F&
  14902.  
  14903. '  ----- VS_VERSION.dwFileFlags -----
  14904. Const VS_FF_DEBUG = &H1&
  14905. Const VS_FF_PRERELEASE = &H2&
  14906. Const VS_FF_PATCHED = &H4&
  14907. Const VS_FF_PRIVATEBUILD = &H8&
  14908. Const VS_FF_INFOINFERRED = &H10&
  14909. Const VS_FF_SPECIALBUILD = &H20&
  14910.  
  14911. '  ----- VS_VERSION.dwFileOS -----
  14912. Const VOS_UNKNOWN = &H0&
  14913. Const VOS_DOS = &H10000
  14914. Const VOS_OS216 = &H20000
  14915. Const VOS_OS232 = &H30000
  14916. Const VOS_NT = &H40000
  14917.  
  14918. Const VOS__BASE = &H0&
  14919. Const VOS__WINDOWS16 = &H1&
  14920. Const VOS__PM16 = &H2&
  14921. Const VOS__PM32 = &H3&
  14922. Const VOS__WINDOWS32 = &H4&
  14923.  
  14924. Const VOS_DOS_WINDOWS16 = &H10001
  14925. Const VOS_DOS_WINDOWS32 = &H10004
  14926. Const VOS_OS216_PM16 = &H20002
  14927. Const VOS_OS232_PM32 = &H30003
  14928. Const VOS_NT_WINDOWS32 = &H40004
  14929.  
  14930. '  ----- VS_VERSION.dwFileType -----
  14931. Const VFT_UNKNOWN = &H0&
  14932. Const VFT_APP = &H1&
  14933. Const VFT_DLL = &H2&
  14934. Const VFT_DRV = &H3&
  14935. Const VFT_FONT = &H4&
  14936. Const VFT_VXD = &H5&
  14937. Const VFT_STATIC_LIB = &H7&
  14938.  
  14939. '  ----- VS_VERSION.dwFileSubtype for VFT_WINDOWS_DRV -----
  14940. Const VFT2_UNKNOWN = &H0&
  14941. Const VFT2_DRV_PRINTER = &H1&
  14942. Const VFT2_DRV_KEYBOARD = &H2&
  14943. Const VFT2_DRV_LANGUAGE = &H3&
  14944. Const VFT2_DRV_DISPLAY = &H4&
  14945. Const VFT2_DRV_MOUSE = &H5&
  14946. Const VFT2_DRV_NETWORK = &H6&
  14947. Const VFT2_DRV_SYSTEM = &H7&
  14948. Const VFT2_DRV_INSTALLABLE = &H8&
  14949. Const VFT2_DRV_SOUND = &H9&
  14950. Const VFT2_DRV_COMM = &HA&
  14951. Const VFT2_DRV_INPUTMETHOD = &HB&
  14952.  
  14953. '  ----- VS_VERSION.dwFileSubtype for VFT_WINDOWS_FONT -----
  14954. Const VFT2_FONT_RASTER = &H1&
  14955. Const VFT2_FONT_VECTOR = &H2&
  14956. Const VFT2_FONT_TRUETYPE = &H3&
  14957.  
  14958. '  ----- VerFindFile() flags -----
  14959. Const VFFF_ISSHAREDFILE = &H1
  14960.  
  14961. Const VFF_CURNEDEST = &H1
  14962. Const VFF_FILEINUSE = &H2
  14963. Const VFF_BUFFTOOSMALL = &H4
  14964.  
  14965. '  ----- VerInstallFile() flags -----
  14966. Const VIFF_FORCEINSTALL = &H1
  14967. Const VIFF_DONTDELETEOLD = &H2
  14968.  
  14969. Const VIF_TEMPFILE = &H1&
  14970. Const VIF_MISMATCH = &H2&
  14971. Const VIF_SRCOLD = &H4&
  14972.  
  14973. Const VIF_DIFFLANG = &H8&
  14974. Const VIF_DIFFCODEPG = &H10&
  14975. Const VIF_DIFFTYPE = &H20&
  14976.  
  14977. Const VIF_WRITEPROT = &H40&
  14978. Const VIF_FILEINUSE = &H80&
  14979. Const VIF_OUTOFSPACE = &H100&
  14980. Const VIF_ACCESSVIOLATION = &H200&
  14981. Const VIF_SHARINGVIOLATION = &H400&
  14982. Const VIF_CANNOTCREATE = &H800&
  14983. Const VIF_CANNOTDELETE = &H1000&
  14984. Const VIF_CANNOTRENAME = &H2000&
  14985. Const VIF_CANNOTDELETECUR = &H4000&
  14986. Const VIF_OUTOFMEMORY = &H8000&
  14987.  
  14988. Const VIF_CANNOTREADSRC = &H10000
  14989. Const VIF_CANNOTREADDST = &H20000
  14990. Const VIF_BUFFTOOSMALL = &H40000
  14991.  
  14992. '  ----- Types and structures -----
  14993.  
  14994. Type VS_FIXEDFILEINFO
  14995.         dwSignature As Long
  14996.         dwStrucVersion As Long         '  e.g. 0x00000042 = "0.42"
  14997.         dwFileVersionMS As Long        '  e.g. 0x00030075 = "3.75"
  14998.         dwFileVersionLS As Long        '  e.g. 0x00000031 = "0.31"
  14999.         dwProductVersionMS As Long     '  e.g. 0x00030010 = "3.10"
  15000.         dwProductVersionLS As Long     '  e.g. 0x00000031 = "0.31"
  15001.         dwFileFlagsMask As Long        '  = 0x3F for version "0.42"
  15002.         dwFileFlags As Long            '  e.g. VFF_DEBUG Or VFF_PRERELEASE
  15003.         dwFileOS As Long               '  e.g. VOS_DOS_WINDOWS16
  15004.         dwFileType As Long             '  e.g. VFT_DRIVER
  15005.         dwFileSubtype As Long          '  e.g. VFT2_DRV_KEYBOARD
  15006.         dwFileDateMS As Long           '  e.g. 0
  15007.         dwFileDateLS As Long           '  e.g. 0
  15008. End Type
  15009.  
  15010. '  ----- Function prototypes -----
  15011.  
  15012. Declare Function VerFindFile Lib "version.dll" Alias "VerFindFileA" (ByVal uFlags As Long, ByVal szFileName As String, ByVal szWinDir As String, ByVal szAppDir As String, ByVal szCurDir As String, lpuCurDirLen As Long, ByVal szDestDir As String, lpuDestDirLen As Long) As Long
  15013. Declare Function VerInstallFile Lib "version.dll" Alias " VerInstallFileA" (ByVal uFlags As Long, ByVal szSrcFileName As String, ByVal szDestFileName As String, ByVal szSrcDir As String, ByVal szDestDir As String, ByVal szCurDir As String, ByVal szTmpFile As String, lpuTmpFileLen As Long) As Long
  15014.  
  15015. '  Returns size of version info in Bytes
  15016. Declare Function GetFileVersionInfoSize Lib "version.dll" Alias "GetFileVersionInfoSizeA" (ByVal lptstrFilename As String, lpdwHandle As Long) As Long
  15017.  
  15018. '  Read version info into buffer
  15019. ' /* Length of buffer for info *
  15020. ' /* Information from GetFileVersionSize *
  15021. ' /* Filename of version stamped file *
  15022. Declare Function GetFileVersionInfo Lib "version.dll"  Alias "GetFileVersionInfoA" (ByVal lptstrFilename As String, ByVal dwHandle As Long, ByVal dwLen As Long, lpData As Any) As Long
  15023. Declare Function VerLanguageName Lib "kernel32" Alias "VerLanguageNameA" (ByVal wLang As Long, ByVal szLang As String, ByVal nSize As Long) As Long
  15024. Declare Function VerQueryValue Lib "version.dll" Alias "VerQueryValue" (pBlock As Any, ByVal lpSubBlock As String, ByVal lplpBuffer As Long, puLen As Long) As Long
  15025.  
  15026. ' ***********************************************************************
  15027. ' *                                                                       *
  15028. ' *   winbase.h -- This module defines the 32-Bit Windows Base APIs       *
  15029. ' *                                                                       *
  15030. ' *   Copyright (c) 1990-1995, Microsoft Corp. All rights reserved.       *
  15031. ' *                                                                       *
  15032. ' ************************************************************************/
  15033. Type ICONMETRICS
  15034.     cbSize As Long
  15035.     iHorzSpacing As Long
  15036.     iVertSpacing As Long
  15037.     iTitleWrap As Long
  15038.     lfFont As LOGFONT
  15039. End Type
  15040.  
  15041. Type HELPINFO
  15042.     cbSize As Long
  15043.     iContextType As Long
  15044.     iCtrlId As Long
  15045.     hItemHandle As Long
  15046.     dwContextId As Long
  15047.     MousePos As POINTAPI
  15048. End Type
  15049.  
  15050. Type ANIMATIONINFO
  15051.     cbSize As Long
  15052.     iMinAnimate As Long
  15053. End Type
  15054.  
  15055. Type MINIMIZEDMETRICS
  15056.     cbSize As Long
  15057.     iWidth As Long
  15058.     iHorzGap As Long
  15059.     iVertGap As Long
  15060.     iArrange As Long
  15061.     lfFont As LOGFONT
  15062. End Type
  15063.  
  15064. '  Define API decoration for direct importing of DLL references.
  15065. Declare Function HeapValidate Lib "kernel32" Alias "HeapValidate" (ByVal hHeap As Long, ByVal dwFlags As Long, lpMem As Any) As Long
  15066. Declare Function HeapCompact Lib "kernel32" Alias "HeapCompact" (ByVal hHeap As Long, ByVal dwFlags As Long) As Long
  15067.  
  15068. Const PROCESS_HEAP_REGION = &H1
  15069. Const PROCESS_HEAP_UNCOMMITTED_RANGE = &H2
  15070. Const PROCESS_HEAP_ENTRY_BUSY = &H4
  15071. Const PROCESS_HEAP_ENTRY_MOVEABLE = &H10
  15072. Const PROCESS_HEAP_ENTRY_DDESHARE = &H20
  15073.  
  15074. Declare Function HeapLock Lib "kernel32" Alias "HeapLock" (ByVal hHeap As Long) As Long
  15075. Declare Function HeapUnlock Lib "kernel32" Alias "HeapUnlock" (ByVal hHeap As Long) As Long
  15076.  
  15077. '  GetBinaryType return values.
  15078.  
  15079. Const SCS_32BIT_BINARY = 0
  15080. Const SCS_DOS_BINARY = 1
  15081. Const SCS_WOW_BINARY = 2
  15082. Const SCS_PIF_BINARY = 3
  15083. Const SCS_POSIX_BINARY = 4
  15084. Const SCS_OS216_BINARY = 5
  15085.  
  15086. Declare Function GetBinaryType Lib "kernel32" Alias "GetBinaryTypeA" (ByVal lpApplicationName As String, lpBinaryType As Long) As Long
  15087.  
  15088. Declare Function GetShortPathName Lib "kernel32" Alias "GetShortPathNameA" (ByVal lpszLongPath As String, ByVal lpszShortPath As String, ByVal cchBuffer As Long) As Long
  15089. Declare Function GetProcessAffinityMask Lib "kernel32" Alias "GetProcessAffinityMask" (ByVal hProcess As Long, lpProcessAffinityMask As Long, SystemAffinityMask As Long) As Long
  15090.  
  15091. '  Logon Support APIs
  15092.  
  15093. Const LOGON32_LOGON_INTERACTIVE = 2
  15094. Const LOGON32_LOGON_BATCH = 4
  15095. Const LOGON32_LOGON_SERVICE = 5
  15096.  
  15097. Const LOGON32_PROVIDER_DEFAULT = 0
  15098. Const LOGON32_PROVIDER_WINNT35 = 1
  15099.  
  15100. Declare Function LogonUser Lib "kernel32" Alias "LogonUserA" (ByVal lpszUsername As String, ByVal lpszDomain As String, ByVal lpszPassword As String, ByVal dwLogonType As Long, ByVal dwLogonProvider As Long, phToken As Long) As Long
  15101.  
  15102. Declare Function ImpersonateLoggedOnUser Lib "kernel32" Alias "ImpersonateLoggedOnUser" (ByVal hToken As Long) As Long
  15103. Declare Function CreateProcessAsUser Lib "advapi32.dll" Alias "CreateProcessAsUserA" (ByVal hToken As Long, ByVal lpApplicationName As String, ByVal lpCommandLine As String, ByVal lpProcessAttributes As SECURITY_ATTRIBUTES, ByVal lpThreadAttributes As SECURITY_ATTRIBUTES, ByVal bInheritHandles As Long, ByVal dwCreationFlags As Long, ByVal lpEnvironment As String, ByVal lpCurrentDirectory As String, ByVal lpStartupInfo As STARTUPINFO, ByVal lpProcessInformation As PROCESS_INFORMATION) As Long
  15104.  
  15105. '  Performance counter API's
  15106.  
  15107. Type OSVERSIONINFO
  15108.         dwOSVersionInfoSize As Long
  15109.         dwMajorVersion As Long
  15110.         dwMinorVersion As Long
  15111.         dwBuildNumber As Long
  15112.         dwPlatformId As Long
  15113.         szCSDVersion As String * 128      '  Maintenance string for PSS usage
  15114. End Type
  15115.  
  15116. '  dwPlatformId defines:
  15117. '
  15118. Const VER_PLATFORM_WIN32s = 0
  15119. Const VER_PLATFORM_WIN32_WINDOWS = 1
  15120. Const VER_PLATFORM_WIN32_NT = 2
  15121.  
  15122. Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" (lpVersionInformation As OSVERSIONINFO) As Long
  15123.  
  15124. '  Power Management APIs
  15125.  
  15126. Const AC_LINE_OFFLINE = &H0
  15127. Const AC_LINE_ONLINE = &H1
  15128. Const AC_LINE_BACKUP_POWER = &H2
  15129. Const AC_LINE_UNKNOWN = &HFF
  15130. Const BATTERY_FLAG_HIGH = &H1
  15131. Const BATTERY_FLAG_LOW = &H2
  15132. Const BATTERY_FLAG_CRITICAL = &H4
  15133. Const BATTERY_FLAG_CHARGING = &H8
  15134. Const BATTERY_FLAG_NO_BATTERY = &H80
  15135. Const BATTERY_FLAG_UNKNOWN = &HFF
  15136. Const BATTERY_PERCENTAGE_UNKNOWN = &HFF
  15137. Const BATTERY_LIFE_UNKNOWN = &HFFFF
  15138.  
  15139. Type SYSTEM_POWER_STATUS
  15140.         ACLineStatus As Byte
  15141.         BatteryFlag As Byte
  15142.         BatteryLifePercent As Byte
  15143.         Reserved1 As Byte
  15144.         BatteryLifeTime As Long
  15145.         BatteryFullLifeTime As Long
  15146. End Type
  15147.  
  15148. Declare Function GetSystemPowerStatus Lib "kernel32" Alias "GetSystemPowerStatus" (lpSystemPowerStatus As SYSTEM_POWER_STATUS) As Long
  15149. Declare Function SetSystemPowerState Lib "kernel32" Alias "SetSystemPowerState" (ByVal fSuspend As Long, ByVal fForce As Long) As Long
  15150.  
  15151. ' *   commdlg.h -- This module defines the 32-Bit Common Dialog APIs      *
  15152.  
  15153. Type OPENFILENAME
  15154.         lStructSize As Long
  15155.         hwndOwner As Long
  15156.         hInstance As Long
  15157.         lpstrFilter As String
  15158.         lpstrCustomFilter As String
  15159.         nMaxCustFilter As Long
  15160.         nFilterIndex As Long
  15161.         lpstrFile As String
  15162.         nMaxFile As Long
  15163.         lpstrFileTitle As String
  15164.         nMaxFileTitle As Long
  15165.         lpstrInitialDir As String
  15166.         lpstrTitle As String
  15167.         flags As Long
  15168.         nFileOffset As Integer
  15169.         nFileExtension As Integer
  15170.         lpstrDefExt As String
  15171.         lCustData As Long
  15172.         lpfnHook As Long
  15173.         lpTemplateName As String
  15174. End Type
  15175.  
  15176. Declare Function GetOpenFileName Lib "comdlg32.dll" Alias "GetOpenFileNameA" (pOpenfilename As OPENFILENAME) As Long
  15177.  
  15178. Declare Function GetSaveFileName Lib "comdlg32.dll" Alias "GetSaveFileNameA" (pOpenfilename As OPENFILENAME) As Long
  15179.  
  15180. Declare Function GetFileTitle Lib "comdlg32.dll" Alias "GetFileTitleA" (ByVal lpszFile As String, ByVal lpszTitle As String, ByVal cbBuf As Integer) As Integer
  15181.  
  15182. Const OFN_READONLY = &H1
  15183. Const OFN_OVERWRITEPROMPT = &H2
  15184. Const OFN_HIDEREADONLY = &H4
  15185. Const OFN_NOCHANGEDIR = &H8
  15186. Const OFN_SHOWHELP = &H10
  15187. Const OFN_ENABLEHOOK = &H20
  15188. Const OFN_ENABLETEMPLATE = &H40
  15189. Const OFN_ENABLETEMPLATEHANDLE = &H80
  15190. Const OFN_NOVALIDATE = &H100
  15191. Const OFN_ALLOWMULTISELECT = &H200
  15192. Const OFN_EXTENSIONDIFFERENT = &H400
  15193. Const OFN_PATHMUSTEXIST = &H800
  15194. Const OFN_FILEMUSTEXIST = &H1000
  15195. Const OFN_CREATEPROMPT = &H2000
  15196. Const OFN_SHAREAWARE = &H4000
  15197. Const OFN_NOREADONLYRETURN = &H8000
  15198. Const OFN_NOTESTFILECREATE = &H10000
  15199. Const OFN_NONETWORKBUTTON = &H20000
  15200. Const OFN_NOLONGNAMES = &H40000                      '  force no long names for 4.x modules
  15201. Const OFN_EXPLORER = &H80000                         '  new look commdlg
  15202. Const OFN_NODEREFERENCELINKS = &H100000
  15203. Const OFN_LONGNAMES = &H200000                       '  force long names for 3.x modules
  15204.  
  15205. Const OFN_SHAREFALLTHROUGH = 2
  15206. Const OFN_SHARENOWARN = 1
  15207. Const OFN_SHAREWARN = 0
  15208.  
  15209. Type NMHDR
  15210.     hwndFrom As Long
  15211.     idfrom As Long
  15212.     code As Long
  15213. End Type
  15214.  
  15215. Type OFNOTIFY
  15216.         hdr As NMHDR
  15217.         lpOFN As OPENFILENAME
  15218.         pszFile As String        '  May be NULL
  15219. End Type
  15220.  
  15221. Const CDM_FIRST = (WM_USER + 100)
  15222. Const CDM_LAST = (WM_USER + 200)
  15223. Const CDM_GETSPEC = (CDM_FIRST + &H0)
  15224. Const CDM_GETFILEPATH = (CDM_FIRST + &H1)
  15225. Const CDM_GETFOLDERPATH = (CDM_FIRST + &H2)
  15226. Const CDM_GETFOLDERIDLIST = (CDM_FIRST + &H3)
  15227. Const CDM_SETCONTROLTEXT = (CDM_FIRST + &H4)
  15228. Const CDM_HIDECONTROL = (CDM_FIRST + &H5)
  15229. Const CDM_SETDEFEXT = (CDM_FIRST + &H6)
  15230.  
  15231. Type CHOOSECOLOR
  15232.         lStructSize As Long
  15233.         hwndOwner As Long
  15234.         hInstance As Long
  15235.         rgbResult As Long
  15236.         lpCustColors As Long
  15237.         flags As Long
  15238.         lCustData As Long
  15239.         lpfnHook As Long
  15240.         lpTemplateName As String
  15241. End Type
  15242.  
  15243. Declare Function ChooseColor Lib "comdlg32.dll" Alias "ChooseColorA" (pChoosecolor As CHOOSECOLOR) As Long
  15244.  
  15245. Const CC_RGBINIT = &H1
  15246. Const CC_FULLOPEN = &H2
  15247. Const CC_PREVENTFULLOPEN = &H4
  15248. Const CC_SHOWHELP = &H8
  15249. Const CC_ENABLEHOOK = &H10
  15250. Const CC_ENABLETEMPLATE = &H20
  15251. Const CC_ENABLETEMPLATEHANDLE = &H40
  15252. Const CC_SOLIDCOLOR = &H80
  15253. Const CC_ANYCOLOR = &H100
  15254.  
  15255. Type FINDREPLACE
  15256.         lStructSize As Long        '  size of this struct 0x20
  15257.         hwndOwner As Long          '  handle to owner's window
  15258.         hInstance As Long          '  instance handle of.EXE that
  15259.                                     '    contains cust. dlg. template
  15260.         flags As Long              '  one or more of the FR_??
  15261.         lpstrFindWhat As String      '  ptr. to search string
  15262.         lpstrReplaceWith As String   '  ptr. to replace string
  15263.         wFindWhatLen As Integer       '  size of find buffer
  15264.         wReplaceWithLen As Integer    '  size of replace buffer
  15265.         lCustData As Long          '  data passed to hook fn.
  15266.         lpfnHook As Long            '  ptr. to hook fn. or NULL
  15267.         lpTemplateName As String     '  custom template name
  15268. End Type
  15269.  
  15270. Const FR_DOWN = &H1
  15271. Const FR_WHOLEWORD = &H2
  15272. Const FR_MATCHCASE = &H4
  15273. Const FR_FINDNEXT = &H8
  15274. Const FR_REPLACE = &H10
  15275. Const FR_REPLACEALL = &H20
  15276. Const FR_DIALOGTERM = &H40
  15277. Const FR_SHOWHELP = &H80
  15278. Const FR_ENABLEHOOK = &H100
  15279. Const FR_ENABLETEMPLATE = &H200
  15280. Const FR_NOUPDOWN = &H400
  15281. Const FR_NOMATCHCASE = &H800
  15282. Const FR_NOWHOLEWORD = &H1000
  15283. Const FR_ENABLETEMPLATEHANDLE = &H2000
  15284. Const FR_HIDEUPDOWN = &H4000
  15285. Const FR_HIDEMATCHCASE = &H8000
  15286. Const FR_HIDEWHOLEWORD = &H10000
  15287.  
  15288. Declare Function FindText Lib "comdlg32.dll" Alias "FindTextA " (pFindreplace As FINDREPLACE) As Long
  15289.  
  15290. Declare Function ReplaceText Lib "comdlg32.dll" Alias "ReplaceTextA" (pFindreplace As FINDREPLACE) As Long
  15291.  
  15292. Type CHOOSEFONT
  15293.         lStructSize As Long
  15294.         hwndOwner As Long          '  caller's window handle
  15295.         hdc As Long                '  printer DC/IC or NULL
  15296.         lpLogFont As Long
  15297.         iPointSize As Long         '  10 * size in points of selected font
  15298.         flags As Long              '  enum. type flags
  15299.         rgbColors As Long          '  returned text color
  15300.         lCustData As Long          '  data passed to hook fn.
  15301.         lpfnHook As Long           '  ptr. to hook function
  15302.         lpTemplateName As String     '  custom template name
  15303.         hInstance As Long          '  instance handle of.EXE that
  15304.                                        '    contains cust. dlg. template
  15305.         lpszStyle As String          '  return the style field here
  15306.                                        '  must be LF_FACESIZE or bigger
  15307.         nFontType As Integer          '  same value reported to the EnumFonts
  15308.                                        '    call back with the extra FONTTYPE_
  15309.                                        '    bits added
  15310.         MISSING_ALIGNMENT As Integer
  15311.         nSizeMin As Long           '  minimum pt size allowed &
  15312.         nSizeMax As Long           '  max pt size allowed if
  15313.                                        '    CF_LIMITSIZE is used
  15314. End Type
  15315.  
  15316. Declare Function ChooseFont Lib "comdlg32.dll" Alias "ChooseFontA" (pChoosefont As CHOOSEFONT) As Long
  15317.  
  15318. Const CF_SCREENFONTS = &H1
  15319. Const CF_PRINTERFONTS = &H2
  15320. Const CF_BOTH = (CF_SCREENFONTS Or CF_PRINTERFONTS)
  15321. Const CF_SHOWHELP = &H4&
  15322. Const CF_ENABLEHOOK = &H8&
  15323. Const CF_ENABLETEMPLATE = &H10&
  15324. Const CF_ENABLETEMPLATEHANDLE = &H20&
  15325. Const CF_INITTOLOGFONTSTRUCT = &H40&
  15326. Const CF_USESTYLE = &H80&
  15327. Const CF_EFFECTS = &H100&
  15328. Const CF_APPLY = &H200&
  15329. Const CF_ANSIONLY = &H400&
  15330. Const CF_SCRIPTSONLY = CF_ANSIONLY
  15331. Const CF_NOVECTORFONTS = &H800&
  15332. Const CF_NOOEMFONTS = CF_NOVECTORFONTS
  15333. Const CF_NOSIMULATIONS = &H1000&
  15334. Const CF_LIMITSIZE = &H2000&
  15335. Const CF_FIXEDPITCHONLY = &H4000&
  15336. Const CF_WYSIWYG = &H8000 '  must also have CF_SCREENFONTS CF_PRINTERFONTS
  15337. Const CF_FORCEFONTEXIST = &H10000
  15338. Const CF_SCALABLEONLY = &H20000
  15339. Const CF_TTONLY = &H40000
  15340. Const CF_NOFACESEL = &H80000
  15341. Const CF_NOSTYLESEL = &H100000
  15342. Const CF_NOSIZESEL = &H200000
  15343. Const CF_SELECTSCRIPT = &H400000
  15344. Const CF_NOSCRIPTSEL = &H800000
  15345. Const CF_NOVERTFONTS = &H1000000
  15346.  
  15347. Const SIMULATED_FONTTYPE = &H8000
  15348. Const PRINTER_FONTTYPE = &H4000
  15349. Const SCREEN_FONTTYPE = &H2000
  15350. Const BOLD_FONTTYPE = &H100
  15351. Const ITALIC_FONTTYPE = &H200
  15352. Const REGULAR_FONTTYPE = &H400
  15353.  
  15354. Const WM_CHOOSEFONT_GETLOGFONT = (WM_USER + 1)
  15355. Const WM_CHOOSEFONT_SETLOGFONT = (WM_USER + 101)
  15356. Const WM_CHOOSEFONT_SETFLAGS = (WM_USER + 102)
  15357.  
  15358. Const LBSELCHSTRING = "commdlg_LBSelChangedNotify"
  15359. Const SHAREVISTRING = "commdlg_ShareViolation"
  15360. Const FILEOKSTRING = "commdlg_FileNameOK"
  15361. Const COLOROKSTRING = "commdlg_ColorOK"
  15362. Const SETRGBSTRING = "commdlg_SetRGBColor"
  15363. Const HELPMSGSTRING = "commdlg_help"
  15364. Const FINDMSGSTRING = "commdlg_FindReplace"
  15365.  
  15366. Const CD_LBSELNOITEMS = -1
  15367. Const CD_LBSELCHANGE = 0
  15368. Const CD_LBSELSUB = 1
  15369. Const CD_LBSELADD = 2
  15370.  
  15371. Type PRINTDLG
  15372.         lStructSize As Long
  15373.         hwndOwner As Long
  15374.         hDevMode As Long
  15375.         hDevNames As Long
  15376.         hdc As Long
  15377.         flags As Long
  15378.         nFromPage As Integer
  15379.         nToPage As Integer
  15380.         nMinPage As Integer
  15381.         nMaxPage As Integer
  15382.         nCopies As Integer
  15383.         hInstance As Long
  15384.         lCustData As Long
  15385.         lpfnPrintHook As Long
  15386.         lpfnSetupHook As Long
  15387.         lpPrintTemplateName As String
  15388.         lpSetupTemplateName As String
  15389.         hPrintTemplate As Long
  15390.         hSetupTemplate As Long
  15391. End Type
  15392.  
  15393. Declare Function PrintDlg Lib "comdlg32.dll" Alias "PrintDlgA" (pPrintdlg As PRINTDLG) As Long
  15394.  
  15395. Const PD_ALLPAGES = &H0
  15396. Const PD_SELECTION = &H1
  15397. Const PD_PAGENUMS = &H2
  15398. Const PD_NOSELECTION = &H4
  15399. Const PD_NOPAGENUMS = &H8
  15400. Const PD_COLLATE = &H10
  15401. Const PD_PRINTTOFILE = &H20
  15402. Const PD_PRINTSETUP = &H40
  15403. Const PD_NOWARNING = &H80
  15404. Const PD_RETURNDC = &H100
  15405. Const PD_RETURNIC = &H200
  15406. Const PD_RETURNDEFAULT = &H400
  15407. Const PD_SHOWHELP = &H800
  15408. Const PD_ENABLEPRINTHOOK = &H1000
  15409. Const PD_ENABLESETUPHOOK = &H2000
  15410. Const PD_ENABLEPRINTTEMPLATE = &H4000
  15411. Const PD_ENABLESETUPTEMPLATE = &H8000
  15412. Const PD_ENABLEPRINTTEMPLATEHANDLE = &H10000
  15413. Const PD_ENABLESETUPTEMPLATEHANDLE = &H20000
  15414. Const PD_USEDEVMODECOPIES = &H40000
  15415. Const PD_USEDEVMODECOPIESANDCOLLATE = &H40000
  15416. Const PD_DISABLEPRINTTOFILE = &H80000
  15417. Const PD_HIDEPRINTTOFILE = &H100000
  15418. Const PD_NONETWORKBUTTON = &H200000
  15419.  
  15420. Type DEVNAMES
  15421.         wDriverOffset As Integer
  15422.         wDeviceOffset As Integer
  15423.         wOutputOffset As Integer
  15424.         wDefault As Integer
  15425. End Type
  15426.  
  15427. Const DN_DEFAULTPRN = &H1
  15428.  
  15429. Declare Function CommDlgExtendedError Lib "comdlg32.dll" Alias "CommDlgExtendedError" () As Long
  15430.  
  15431. Const WM_PSD_PAGESETUPDLG = (WM_USER)
  15432. Const WM_PSD_FULLPAGERECT = (WM_USER + 1)
  15433. Const WM_PSD_MINMARGINRECT = (WM_USER + 2)
  15434. Const WM_PSD_MARGINRECT = (WM_USER + 3)
  15435. Const WM_PSD_GREEKTEXTRECT = (WM_USER + 4)
  15436. Const WM_PSD_ENVSTAMPRECT = (WM_USER + 5)
  15437. Const WM_PSD_YAFULLPAGERECT = (WM_USER + 6)
  15438.  
  15439. Type PAGESETUPDLG
  15440.         lStructSize As Long
  15441.         hwndOwner As Long
  15442.         hDevMode As Long
  15443.         hDevNames As Long
  15444.         flags As Long
  15445.         ptPaperSize As POINTAPI
  15446.         rtMinMargin As Rect
  15447.         rtMargin As Rect
  15448.         hInstance As Long
  15449.         lCustData As Long
  15450.         lpfnPageSetupHook As Long
  15451.         lpfnPagePaintHook As Long
  15452.         lpPageSetupTemplateName As String
  15453.         hPageSetupTemplate As Long
  15454. End Type
  15455.  
  15456. Declare Function PageSetupDlg Lib "comdlg32.dll" Alias "PageSetupDlgA" (pPagesetupdlg As PAGESETUPDLG) As Long
  15457.  
  15458. Const PSD_DEFAULTMINMARGINS = &H0 '  default (printer's)
  15459. Const PSD_INWININIINTLMEASURE = &H0 '  1st of 4 possible
  15460.  
  15461. Const PSD_MINMARGINS = &H1 '  use caller's
  15462. Const PSD_MARGINS = &H2 '  use caller's
  15463. Const PSD_INTHOUSANDTHSOFINCHES = &H4 '  2nd of 4 possible
  15464. Const PSD_INHUNDREDTHSOFMILLIMETERS = &H8 '  3rd of 4 possible
  15465. Const PSD_DISABLEMARGINS = &H10
  15466. Const PSD_DISABLEPRINTER = &H20
  15467. Const PSD_NOWARNING = &H80 '  must be same as PD_*
  15468. Const PSD_DISABLEORIENTATION = &H100
  15469. Const PSD_RETURNDEFAULT = &H400 '  must be same as PD_*
  15470. Const PSD_DISABLEPAPER = &H200
  15471. Const PSD_SHOWHELP = &H800 '  must be same as PD_*
  15472. Const PSD_ENABLEPAGESETUPHOOK = &H2000 '  must be same as PD_*
  15473. Const PSD_ENABLEPAGESETUPTEMPLATE = &H8000 '  must be same as PD_*
  15474. Const PSD_ENABLEPAGESETUPTEMPLATEHANDLE = &H20000 '  must be same as PD_*
  15475. Const PSD_ENABLEPAGEPAINTHOOK = &H40000
  15476. Const PSD_DISABLEPAGEPAINTING = &H80000
  15477.  
  15478. Declare Function DdeInitialize Lib "user32" Alias "DdeInitializeA" (pidInst As Long, ByVal pfnCallback As Long, ByVal afCmd As Long, ByVal ulRes As Long) As Integer
  15479. Declare Function SetServiceBits Lib "advapi32" Alias "SetServiceBits" (ByVal hServiceStatus As Long, ByVal dwServiceBits As Long, ByVal bSetBitsOn As Boolean, ByVal bUpdateImmediately As Boolean) As Long
  15480. Declare Function CopyLZFile Lib "lz32" Alias "CopyLZFile" (ByVal n1 As Long, ByVal n2 As Long) As Long
  15481. Declare Function LZStart Lib "lz32" Alias "LZStart" () As Long
  15482. Declare Sub LZDone Lib "lz32" Alias "LZDone" ()
  15483. Declare Function mciGetYieldProc Lib "winmm" Alias "mciGetYieldProc" (ByVal mciId As Long, pdwYieldData As Long) As Long
  15484. Declare Function mciSetYieldProc Lib "winmm" Alias "mciSetYieldProc" (ByVal mciId As Long, ByVal fpYieldProc As Long, ByVal dwYieldData As Long) As Long
  15485. Declare Function midiOutGetNumDevs Lib "winmm" Alias "midiOutGetNumDevs" () As Integer
  15486. Declare Function mmioInstallIOProcA Lib "winmm" Alias "mmioInstallIOProcA" (ByVal fccIOProc As String * 4, ByVal pIOProc As Long, ByVal dwFlags As Long) As Long
  15487. Declare Function CommandLineToArgv Lib "shell32" Alias "CommandLineToArgvW" (ByVal lpCmdLine As String, pNumArgs As Integer) As Long
  15488. Declare Function IsTextUnicode Lib "advapi32" Alias "IsTextUnicode" (lpBuffer As Any, ByVal cb As Long, lpi As Long) As Long
  15489. Declare Function NotifyChangeEventLog Lib "advapi32" Alias "NotifyChangeEventLog" (ByVal hEventLog As Long, ByVal hEvent As Long) As Long
  15490. Declare Function SetThreadToken Lib "advapi32" Alias "SetThreadToken" (Thread As Long, ByVal Token As Long) As Long
  15491.  
  15492. Type COMMCONFIG
  15493.     dwSize As Long
  15494.     wVersion As Integer
  15495.     wReserved As Integer
  15496.     dcbx As DCB
  15497.     dwProviderSubType As Long
  15498.     dwProviderOffset As Long
  15499.     dwProviderSize As Long
  15500.     wcProviderData As Byte
  15501. End Type
  15502.  
  15503. Declare Function CommConfigDialog Lib "kernel32" Alias "CommConfigDialogA" (ByVal lpszName As String, ByVal hWnd As Long, lpCC As COMMCONFIG) As Long
  15504. Declare Function CreateIoCompletionPort Lib "kernel32" Alias "CreateIoCompletionPort" (ByVal FileHandle As Long, ByVal ExistingCompletionPort As Long, ByVal CompletionKey As Long, ByVal NumberOfConcurrentThreads As Long) As Long
  15505. Declare Function DisableThreadLibraryCalls Lib "kernel32" Alias "DisableThreadLibraryCalls" (ByVal hLibModule As Long) As Long
  15506. Declare Function EnumResourceLanguages Lib "kernel32" Alias "EnumResourceLanguagesA" (ByVal hModule As Long, ByVal lpType As String, ByVal lpName As String, ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long
  15507. Declare Function EnumResourceNames Lib "kernel32" Alias "EnumResourceNamesA" (ByVal hModule As Long, ByVal lpType As String, ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long
  15508. Declare Function EnumResourceTypes Lib "kernel32" Alias "EnumResourceTypesA" (ByVal hModule As Long, ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long
  15509. Declare Function FreeEnvironmentStrings Lib "kernel32" Alias "FreeEnvironmentStringsA" (ByVal lpsz As String) As Long
  15510.  
  15511. Declare Sub FreeLibraryAndExitThread Lib "kernel32" Alias "FreeLibraryAndExitThread" (ByVal hLibModule As Long, ByVal dwExitCode As Long)
  15512. Declare Function FreeResource Lib "kernel32" Alias "FreeResource" (ByVal hResData As Long) As Long
  15513. Declare Function GetCommConfig Lib "kernel32" Alias "GetCommConfig" (ByVal hCommDev As Long, lpCC As COMMCONFIG, lpdwSize As Long) As Long
  15514. Declare Function GetCompressedFileSize Lib "kernel32" Alias "GetCompressedFileSizeA" (ByVal lpFileName As String, lpFileSizeHigh As Long) As Long
  15515. Declare Function GetDefaultCommConfig Lib "kernel32" Alias "GetDefaultCommConfigA" (ByVal lpszName As String, lpCC As COMMCONFIG, lpdwSize As Long) As Long
  15516. Declare Function GetHandleInformation Lib "kernel32" Alias "GetHandleInformation" (ByVal hObject As Long, lpdwFlags As Long) As Long
  15517. Declare Function GetProcessHeaps Lib "kernel32" Alias "GetProcessHeaps" (ByVal NumberOfHeaps As Long, ProcessHeaps As Long) As Long
  15518. Declare Function GetProcessWorkingSetSize Lib "kernel32" Alias "GetProcessWorkingSetSize" (ByVal hProcess As Long, lpMinimumWorkingSetSize As Long, lpMaximumWorkingSetSize As Long) As Long
  15519. Declare Function GetQueuedCompletionStatus Lib "kernel32" Alias "GetQueuedCompletionStatus" (ByVal CompletionPort As Long, lpNumberOfBytesTransferred As Long, lpCompletionKey As Long, lpOverlapped As Long, ByVal dwMilliseconds As Long) As Long
  15520. Declare Function GetSystemTimeAdjustment Lib "kernel32" Alias "GetSystemTimeAdjustment" (lpTimeAdjustment As Long, lpTimeIncrement As Long, lpTimeAdjustmentDisabled As Long) As Long
  15521.  
  15522. Declare Function GlobalCompact Lib "kernel32" Alias "GlobalCompact" (ByVal dwMinFree As Long) As Long
  15523. Declare Sub GlobalFix Lib "kernel32" Alias "GlobalFix" (ByVal hMem As Long)
  15524. Declare Sub GlobalUnfix Lib "kernel32" Alias "GlobalUnfix" (ByVal hMem As Long)
  15525. Declare Function GlobalWire Lib "kernel32" Alias "GlobalWire" (ByVal hMem As Long) As Long
  15526. Declare Function GlobalUnWire Lib "kernel32" Alias "GlobalUnWire" (ByVal hMem As Long) As Long
  15527.  
  15528. Declare Function IsBadCodePtr Lib "kernel32" Alias "IsBadCodePtr" (ByVal lpfn As Long) As Long
  15529. Declare Function LocalCompact Lib "kernel32" Alias "LocalCompact" (ByVal uMinFree As Long) As Long
  15530. Declare Function LocalShrink Lib "kernel32" Alias "LocalShrink" (ByVal hMem As Long, ByVal cbNewSize As Long) As Long
  15531. Declare Sub ZeroMemory Lib "KERNEL32" Alias "RtlMoveMemory"  (dest As Any, ByVal numBytes As Long)
  15532. Declare Function ReadFileEx Lib "kernel32" Alias "ReadFileEx" (ByVal hFile As Long, lpBuffer As Any, ByVal nNumberOfBytesToRead As Long, lpOverlapped As OVERLAPPED, ByVal lpCompletionRoutine As Long) As Long
  15533.  
  15534. Declare Function SetCommConfig Lib "kernel32" Alias "SetCommConfig" (ByVal hCommDev As Long, lpCC As COMMCONFIG, ByVal dwSize As Long) As Long
  15535. Declare Function SetDefaultCommConfig Lib "kernel32" Alias "SetDefaultCommConfigA" (ByVal lpszName As String, lpCC As COMMCONFIG, ByVal dwSize As Long) As Long
  15536. Declare Sub SetFileApisToANSI Lib "kernel32" Alias "SetFileApisToANSI" ()
  15537. Declare Function SetHandleInformation Lib "kernel32" Alias "SetHandleInformation" (ByVal hObject As Long, ByVal dwMask As Long, ByVal dwFlags As Long) As Long
  15538. Declare Function SetProcessWorkingSetSize Lib "kernel32" Alias "SetProcessWorkingSetSize" (ByVal hProcess As Long, ByVal dwMinimumWorkingSetSize As Long, ByVal dwMaximumWorkingSetSize As Long) As Long
  15539.  
  15540. Declare Function lstrcat Lib "kernel32" Alias "lstrcatA" (ByVal lpString1 As String, ByVal lpString2 As String) As Long
  15541. Declare Function lstrcpyn Lib "kernel32" Alias "lstrcpynA" (ByVal lpString1 As String, ByVal lpString2 As String, ByVal iMaxLength As Long) As Long
  15542. Declare Function lstrcpy Lib "kernel32" Alias "lstrcpyA" (ByVal lpString1 As String, ByVal lpString2 As String) As Long
  15543. Declare Function SetSystemTimeAdjustment Lib "kernel32" Alias "SetSystemTimeAdjustment" (ByVal dwTimeAdjustment As Long, ByVal bTimeAdjustmentDisabled As Boolean) As Long
  15544. Declare Function SetThreadAffinityMask Lib "kernel32" Alias "SetThreadAffinityMask" (ByVal hThread As Long, ByVal dwThreadAffinityMask As Long) As Long
  15545. Declare Function SetUnhandledExceptionFilter Lib "kernel32" Alias "SetUnhandledExceptionFilter" (ByVal lpTopLevelExceptionFilter As Long) As Long
  15546. Declare Function SystemTimeToTzSpecificLocalTime Lib "kernel32" Alias "SystemTimeToTzSpecificLocalTime" (lpTimeZoneInformation As TIME_ZONE_INFORMATION, lpUniversalTime As SYSTEMTIME, lpLocalTime As SYSTEMTIME) As Long
  15547. Declare Function WriteFileEx Lib "kernel32" Alias "WriteFileEx" (ByVal hFile As Long, lpBuffer As Any, ByVal nNumberOfBytesToWrite As Long, lpOverlapped As OVERLAPPED, ByVal lpCompletionRoutine As Long) As Long
  15548.  
  15549. Type PIXELFORMATDESCRIPTOR
  15550.     nSize As Integer
  15551.     nVersion As Integer
  15552.     dwFlags As Long
  15553.     iPixelType As Byte
  15554.     cColorBits As Byte
  15555.     cRedBits As Byte
  15556.     cRedShift As Byte
  15557.     cGreenBits As Byte
  15558.     cGreenShift As Byte
  15559.     cBlueBits As Byte
  15560.     cBlueShift As Byte
  15561.     cAlphaBits As Byte
  15562.     cAlphaShift As Byte
  15563.     cAccumBits As Byte
  15564.     cAccumRedBits As Byte
  15565.     cAccumGreenBits As Byte
  15566.     cAccumBlueBits As Byte
  15567.     cAccumAlphaBits As Byte
  15568.     cDepthBits As Byte
  15569.     cStencilBits As Byte
  15570.     cAuxBuffers As Byte
  15571.     iLayerType As Byte
  15572.     bReserved As Byte
  15573.     dwLayerMask As Long
  15574.     dwVisibleMask As Long
  15575.     dwDamageMask As Long
  15576. End Type
  15577.  
  15578. Declare Function ChoosePixelFormat Lib "gdi32" Alias "ChoosePixelFormat" (ByVal hDC As Long, pPixelFormatDescriptor As PIXELFORMATDESCRIPTOR) As Long
  15579. Declare Function CreateDIBSection Lib "gdi32" Alias "CreateDIBSection" (ByVal hDC As Long, pBitmapInfo As BITMAPINFO, ByVal un As Long, ByVal lplpVoid As Long, ByVal handle As Long, ByVal dw As Long) As Long
  15580. Declare Function DescribePixelFormat Lib "gdi32" Alias "DescribePixelFormat" (ByVal hDC As Long, ByVal n As Long, ByVal un As Long, lpPixelFormatDescriptor As PIXELFORMATDESCRIPTOR) As Long
  15581. Declare Function EndDoc Lib "gdi32" Alias "EndDoc" (ByVal hDC As Long) As Long
  15582. Declare Function EnumFonts Lib "gdi32" Alias "EnumFontsA" (ByVal hDC As Long, ByVal lpsz As String, ByVal lpFontEnumProc As Long, ByVal lParam As Long) As Long
  15583. Declare Function EnumMetaFile Lib "gdi32" Alias "EnumMetaFile" (ByVal hDC As Long, ByVal hMetafile As Long, ByVal lpMFEnumProc As Long, ByVal lParam As Long) As Long
  15584. Declare Function EnumObjects Lib "gdi32" Alias "EnumObjects" (ByVal hDC As Long, ByVal n As Long, ByVal lpGOBJEnumProc As Long, lpVoid As Any) As Long
  15585.  
  15586. Declare Function FixBrushOrgEx Lib "gdi32" Alias "FixBrushOrgEx" (ByVal hDC As Long, ByVal n1 As Long, ByVal n2 As Long, lpPoint As POINTAPI) As Long
  15587. Declare Function GetBrushOrgEx Lib "gdi32" Alias "GetBrushOrgEx" (ByVal hDC As Long, lpPoint As POINTAPI) As Long
  15588. Declare Function GetDIBColorTable Lib "gdi32" Alias "GetDIBColorTable" (ByVal hDC As Long, ByVal un1 As Long, ByVal un2 As Long, pRGBQuad As RGBQUAD) As Long
  15589. Declare Function GetPixelFormat Lib "gdi32" Alias "GetPixelFormat" (ByVal hDC As Long) As Long
  15590. Declare Function LineDDA Lib "gdi32" Alias "LineDDA" (ByVal n1 As Long, ByVal n2 As Long, ByVal n3 As Long, ByVal n4 As Long, ByVal lpLineDDAProc As Long, ByVal lParam As Long) As Long
  15591.  
  15592. Declare Function SetAbortProc Lib "gdi32" Alias "SetAbortProc" (ByVal hDC As Long, ByVal lpAbortProc As Long) As Long
  15593. Declare Function SetDIBColorTable Lib "gdi32" Alias "SetDIBColorTable" (ByVal hDC As Long, ByVal un1 As Long, ByVal un2 As Long, pcRGBQuad As RGBQUAD) As Long
  15594. Declare Function SetPixelFormat Lib "gdi32" Alias "SetPixelFormat" (ByVal hDC As Long, ByVal n As Long, pcPixelFormatDescriptor As PIXELFORMATDESCRIPTOR) As Long
  15595. Declare Function SwapBuffers Lib "gdi32" Alias "SwapBuffers" (ByVal hDC As Long) As Long
  15596. Declare Function EnumCalendarInfo Lib "kernel32" Alias "EnumCalendarInfoA" (ByVal lpCalInfoEnumProc As Long, ByVal Locale As Long, ByVal Calendar As Long, ByVal CalType As Long) As Long
  15597. Declare Function GetCurrencyFormat Lib "kernel32" Alias "GetCurrencyFormatA" (ByVal Locale As Long, ByVal dwFlags As Long, ByVal lpValue As String, lpFormat As CURRENCYFMT, ByVal lpCurrencyStr As String, ByVal cchCurrency As Long) As Long
  15598. Declare Function GetNumberFormat Lib "kernel32" Alias "GetNumberFormatA" (ByVal Locale As Long, ByVal dwFlags As Long, ByVal lpValue As String, lpFormat As NUMBERFMT, ByVal lpNumberStr As String, ByVal cchNumber As Long) As Long
  15599. Declare Function GetStringTypeEx Lib "kernel32" Alias "GetStringTypeExA" (ByVal Locale As Long, ByVal dwInfoType As Long, ByVal lpSrcStr As String, ByVal cchSrc As Long, lpCharType As Integer) As Long
  15600. Declare Function GetStringTypeW Lib "kernel32" Alias "GetStringTypeW" (ByVal dwInfoType As Long, ByVal lpSrcStr As String, ByVal cchSrc As Long, lpCharType As Integer) As Long
  15601. Declare Function SetLocaleInfo Lib "kernel32" Alias "SetLocaleInfoA" (ByVal Locale As Long, ByVal LCType As Long, ByVal lpLCData As String) As Long
  15602.  
  15603. Declare Function DeletePrinter Lib "winspool.drv" Alias "DeletePrinter" (ByVal hPrinter As Long) As Long
  15604.  
  15605. Declare Function FindClosePrinterChangeNotification Lib "winspool.drv" Alias "FindClosePrinterChangeNotification" (ByVal hChange As Long) As Long
  15606. Declare Function FindFirstPrinterChangeNotification Lib "winspool.drv" Alias "FindFirstPrinterChangeNotification" (ByVal hPrinter As Long, ByVal fdwFlags As Long, ByVal fdwOptions As Long, ByVal pPrinterNotifyOptions As String) As Long
  15607. Declare Function FindNextPrinterChangeNotification Lib "winspool.drv" Alias "FindNextPrinterChangeNotification" (ByVal hChange As Long, pdwChange As Long, ByVal pvReserved As String, ByVal ppPrinterNotifyInfo As Long) As Long
  15608. Declare Function GetPrinter Lib "winspool.drv" Alias "GetPrinterA" (ByVal hPrinter As Long, ByVal Level As Long, pPrinter As Any, ByVal cbBuf As Long, pcbNeeded As Long) As Long
  15609. Declare Function SetPrinter Lib "winspool.drv" Alias "SetPrinterA" (ByVal hPrinter As Long, ByVal Level As Long, pPrinter As Byte, ByVal Command As Long) As Long
  15610.  
  15611. Declare Function BroadcastSystemMessage Lib "user32" Alias "BroadcastSystemMessage" (ByVal dw As Long, pdw As Long, ByVal un As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
  15612. Declare Function CallWindowProc Lib "user32" Alias "CallWindowProcA" (ByVal lpPrevWndFunc As Long, ByVal hWnd As Long, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
  15613. Declare Function CascadeWindows Lib "user32" Alias "CascadeWindows" (ByVal hwndParent As Long, ByVal wHow As Long, ByVal lpRect As RECT, ByVal cKids As Long, lpkids As Long) As Integer
  15614. Declare Function ChangeMenu Lib "user32" Alias "ChangeMenuA" (ByVal hMenu As Long, ByVal cmd As Long, ByVal lpszNewItem As String, ByVal cmdInsert As Long, ByVal flags As Long) As Long
  15615. Declare Function CheckMenuRadioItem Lib "user32" Alias "CheckMenuRadioItem" (ByVal hMenu As Long, ByVal un1 As Long, ByVal un2 As Long, ByVal un3 As Long, ByVal un4 As Long) As Long
  15616. Declare Function ChildWindowFromPoint Lib "user32" Alias "ChildWindowFromPoint" (ByVal hWndParent As Long, ByVal pt As POINTAPI) As Long
  15617. Declare Function ChildWindowFromPointEx Lib "user32" Alias "ChildWindowFromPointEx" (ByVal hWnd As Long, ByVal pt As POINTAPI, ByVal un As Long) As Long
  15618. Declare Function CloseDesktop Lib "user32" Alias "CloseDesktop" (ByVal hDesktop As Long) As Long
  15619. Declare Function CloseWindowStation Lib "user32" Alias "CloseWindowStation" (ByVal hWinSta As Long) As Long
  15620.  
  15621. Declare Function CopyImage Lib "user32" Alias "CopyImage" (ByVal handle As Long, ByVal un1 As Long, ByVal n1 As Long, ByVal n2 As Long, ByVal un2 As Long) As Long
  15622. Declare Function CreateDesktop Lib "user32" Alias "CreateDesktopA" (ByVal lpszDesktop As String, ByVal lpszDevice As String, pDevmode As DEVMODE, ByVal dwFlags As Long, ByVal dwDesiredAccess As Long, lpsa As SECURITY_ATTRIBUTES) As Long
  15623. Declare Function CreateDialogIndirectParam Lib "user32" Alias "CreateDialogIndirectParamA" (ByVal hInstance As Long, lpTemplate As DLGTEMPLATE, ByVal hWndParent As Long, ByVal lpDialogFunc As Long, ByVal dwInitParam As Long) As Long
  15624. Declare Function CreateDialogParam Lib "user32" Alias "CreateDialogParamA" (ByVal hInstance As Long, ByVal lpName As String, ByVal hWndParent As Long, ByVal lpDialogFunc As Long, ByVal lParamInit As Long) As Long
  15625. Declare Function CreateIconFromResource Lib "user32" Alias "CreateIconFromResource" (presbits As Byte, ByVal dwResSize As Long, ByVal fIcon As Long, ByVal dwVer As Long) As Long
  15626.  
  15627. Declare Function DialogBoxIndirectParam Lib "user32" Alias "DialogBoxIndirectParamA" (ByVal hInstance As Long, hDialogTemplate As DLGTEMPLATE, ByVal hWndParent As Long, ByVal lpDialogFunc As Long, ByVal dwInitParam As Long) As Long
  15628.  
  15629. Declare Function DragDetect Lib "user32" Alias "DragDetect" (ByVal hWnd As Long, ByVal pt As POINTAPI) As Long
  15630. Declare Function DragObject Lib "user32" Alias "DragObject" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal un As Long, ByVal dw As Long, ByVal hCursor As Long) As Long
  15631. Declare Function DrawAnimatedRects Lib "user32" Alias "DrawAnimatedRects" (ByVal hwnd As Long, ByVal idAni As Long, lprcFrom As Rect, lprcTo As Rect) As Long
  15632. Declare Function DrawCaption Lib "user32" Alias "DrawCaption" (ByVal hWnd As Long, ByVal hDC As Long, pcRect As Rect, ByVal un As Long) As Long
  15633. Declare Function DrawEdge Lib "user32" Alias "DrawEdge" (ByVal hdc As Long, qrc As RECT, ByVal edge As Long, ByVal grfFlags As Long) As Long
  15634. Declare Function DrawFrameControl Lib "user32" Alias "DrawFrameControl" (ByVal hDC As Long, lpRect As RECT, ByVal un1 As Long, ByVal un2 As Long) As Long
  15635. Declare Function DrawIconEx Lib "user32" Alias "DrawIconEx" (ByVal hdc As Long, ByVal xLeft As Long, ByVal yTop As Long, ByVal hIcon As Long, ByVal cxWidth As Long, ByVal cyWidth As Long, ByVal istepIfAniCur As Long, ByVal hbrFlickerFreeDraw As Long, ByVal diFlags As Long) As Long
  15636. Declare Function DrawState Lib "user32" Alias "DrawStateA" (ByVal hDC As Long, ByVal hBrush As Long, ByVal lpDrawStateProc As Long, ByVal lParam As Long, ByVal wParam As Long, ByVal n1 As Long, ByVal n2 As Long, ByVal n3 As Long, ByVal n4 As Long, ByVal un As Long) As Long
  15637.  
  15638. Type DRAWTEXTPARAMS
  15639.     cbSize As Long
  15640.     iTabLength As Long
  15641.     iLeftMargin As Long
  15642.     iRightMargin As Long
  15643.     uiLengthDrawn As Long
  15644. End Type
  15645.  
  15646. Declare Function DrawTextEx Lib "user32" Alias "DrawTextExA" (ByVal hDC As Long, ByVal lpsz As String, ByVal n As Long, lpRect As RECT, ByVal un As Long, lpDrawTextParams As DRAWTEXTPARAMS) As Long
  15647. Declare Function EnumChildWindows Lib "user32" Alias "EnumChildWindows" (ByVal hWndParent As Long, ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long
  15648. Declare Function EnumDesktops Lib "user32" Alias "EnumDesktopsA" (ByVal hwinsta As Long, ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long
  15649. Declare Function EnumDesktopWindows Lib "user32" Alias "EnumDesktopWindows" (ByVal hDesktop As Long, ByVal lpfn As Long, ByVal lParam As Long) As Long
  15650. Declare Function EnumPropsEx Lib "user32" Alias "EnumPropsExA" (ByVal hWnd As Long, ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long
  15651. Declare Function EnumProps Lib "user32" Alias "EnumPropsA" (ByVal hWnd As Long, ByVal lpEnumFunc As Long) As Long
  15652. Declare Function EnumThreadWindows Lib "user32" Alias "EnumThreadWindows" (ByVal dwThreadId As Long, ByVal lpfn As Long, ByVal lParam As Long) As Long
  15653. Declare Function EnumWindows Lib "user32" (ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long
  15654. Declare Function EnumWindowStations Lib "user32" Alias "EnumWindowStationsA" (ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long
  15655. Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
  15656.  
  15657. Declare Function GetKeyboardLayoutList Lib "user32" Alias "GetKeyboardLayoutList" (ByVal nBuff As Long, lpList As Long) As Long
  15658. Declare Function GetKeyboardLayout Lib "user32" Alias "GetKeyboardLayout" (ByVal dwLayout As Long) As Long
  15659. Declare Function GetMenuContextHelpId Lib "user32" Alias "GetMenuContextHelpId" (ByVal hMenu As Long) As Long
  15660. Declare Function GetMenuDefaultItem Lib "user32" Alias "GetMenuDefaultItem" (ByVal hMenu As Long, ByVal fByPos As Long, ByVal gmdiFlags As Long) As Long
  15661.  
  15662. Type MENUITEMINFO
  15663.     cbSize As Long
  15664.     fMask As Long
  15665.     fType As Long
  15666.     fState As Long
  15667.     wID As Long
  15668.     hSubMenu As Long
  15669.     hbmpChecked As Long
  15670.     hbmpUnchecked As Long
  15671.     dwItemData As Long
  15672.     dwTypeData As String
  15673.     cch As Long
  15674. End Type
  15675.  
  15676. Declare Function GetMenuItemInfo Lib "user32" Alias "GetMenuItemInfoA" (ByVal hMenu As Long, ByVal un As Long, ByVal b As Long, lpMenuItemInfo As MENUITEMINFO) As Long
  15677. Declare Function GetMenuItemRect Lib "user32" Alias "GetMenuItemRect" (ByVal hWnd As Long, ByVal hMenu As Long, ByVal uItem As Long, lprcItem As RECT) As Long
  15678.  
  15679. Type SCROLLINFO
  15680.     cbSize As Long
  15681.     fMask As Long
  15682.     nMin As Long
  15683.     nMax As Long
  15684.     nPage As Long
  15685.     nPos As Long
  15686.     nTrackPos As Long
  15687. End Type
  15688.  
  15689. Declare Function GetScrollInfo Lib "user32" Alias "GetScrollInfo" (ByVal hWnd As Long, ByVal n As Long, lpScrollInfo As SCROLLINFO) As Long
  15690. Declare Function GetSysColorBrush Lib "user32" Alias "GetSysColorBrush" (ByVal nIndex As Long) As Long
  15691. Declare Function GetUserObjectInformation Lib "user32" Alias "GetUserObjectInformationA" (ByVal hObj As Long, ByVal nIndex As Long, pvInfo As Any, ByVal nLength As Long, lpnLengthNeeded As Long) As Long
  15692. Declare Function GetWindowContextHelpId Lib "user32" Alias "GetWindowContextHelpId" (ByVal hWnd As Long) As Long
  15693. Declare Function GetWindowRgn Lib "user32" Alias "GetWindowRgn" (ByVal hWnd As Long, ByVal hRgn As Long) As Long
  15694. Declare Function GrayString Lib "user32" Alias "GrayStringA" (ByVal hDC As Long, ByVal hBrush As Long, ByVal lpOutputFunc As Long, ByVal lpData As Long, ByVal nCount As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long) As Long
  15695. Declare Function InsertMenuItem Lib "user32" Alias "InsertMenuItemA" (ByVal hMenu As Long, ByVal un As Long, ByVal bool As Boolean, ByRef lpcMenuItemInfo As MENUITEMINFO) As Long
  15696. Declare Function LoadCursorFromFile Lib "user32" Alias "LoadCursorFromFileA" (ByVal lpFileName As String) As Long
  15697. Declare Function LoadImage Lib "user32" Alias "LoadImageA" (ByVal hInst As Long, ByVal lpsz As String, ByVal un1 As Long, ByVal n1 As Long, ByVal n2 As Long, ByVal un2 As Long) As Long
  15698. Declare Function LookupIconIdFromDirectoryEx Lib "user32" Alias "LookupIconIdFromDirectoryEx" (presbits As Byte, ByVal fIcon As Boolean, ByVal cxDesired As Long, ByVal cyDesired As Long, ByVal Flags As Long) As Long
  15699. Declare Function MapVirtualKeyEx Lib "user32" Alias "MapVirtualKeyExA" (ByVal uCode As Long, ByVal uMapType As Long, ByVal dwhkl As Long) As Long
  15700. Declare Function MenuItemFromPoint Lib "user32" Alias "MenuItemFromPoint" (ByVal hWnd As Long, ByVal hMenu As Long, ByVal ptScreen As POINTAPI) As Long
  15701.  
  15702. Type MSGBOXPARAMS
  15703.     cbSize As Long
  15704.     hwndOwner As Long
  15705.     hInstance As Long
  15706.     lpszText As String
  15707.     lpszCaption As String
  15708.     dwStyle As Long
  15709.     lpszIcon As String
  15710.     dwContextHelpId As Long
  15711.     lpfnMsgBoxCallback As Long
  15712.     dwLanguageId As Long
  15713. End Type
  15714.  
  15715. Declare Function MessageBoxIndirect Lib "user32" Alias "MessageBoxIndirectA" (lpMsgBoxParams As MSGBOXPARAMS) As Long
  15716. Declare Function OpenDesktop Lib "user32" Alias "OpenDesktopA" (ByVal lpszDesktop As String, ByVal dwFlags As Long, ByVal fInherit As Boolean, ByVal dwDesiredAccess As Long) As Long
  15717. Declare Function OpenInputDesktop Lib "user32" Alias "OpenInputDesktop" (ByVal dwFlags As Long, ByVal fInherit As Boolean, ByVal dwDesiredAccess As Long) As Long
  15718. Declare Function OpenWindowStation Lib "user32" Alias "OpenWindowStationA" (ByVal lpszWinSta As String, ByVal fInherit As Boolean, ByVal dwDesiredAccess As Long) As Long
  15719. Declare Function PaintDesktop Lib "user32" Alias "PaintDesktop" (ByVal hdc As Long) As Long
  15720.  
  15721. Type WNDCLASSEX
  15722.     cbSize As Long
  15723.     style As Long
  15724.     lpfnWndProc As Long
  15725.     cbClsExtra As Long
  15726.     cbWndExtra As Long
  15727.     hInstance As Long
  15728.     hIcon As Long
  15729.     hCursor As Long
  15730.     hbrBackground As Long
  15731.     lpszMenuName As String
  15732.     lpszClassName As String
  15733.     hIconSm As Long
  15734. End Type
  15735.  
  15736. Declare Function RegisterClassEx Lib "user32" Alias "RegisterClassExA" (pcWndClassEx As WNDCLASSEX) As Integer
  15737. Declare Function SetMenuContextHelpId Lib "user32" Alias "SetMenuContextHelpId" (ByVal hMenu As Long, ByVal dw As Long) As Long
  15738. Declare Function SetMenuDefaultItem Lib "user32" Alias "SetMenuDefaultItem" (ByVal hMenu As Long, ByVal uItem As Long, ByVal fByPos As Long) As Long
  15739. Declare Function SetMenuItemInfo Lib "user32" Alias "SetMenuItemInfoA" (ByVal hMenu As Long, ByVal un As Long, ByVal bool As Boolean, lpcMenuItemInfo As MENUITEMINFO) As Long
  15740. Declare Function SetMessageExtraInfo Lib "user32" Alias "SetMessageExtraInfo" (ByVal lParam As Long) As Long
  15741. Declare Function SetMessageQueue Lib "user32" Alias "SetMessageQueue" (ByVal cMessagesMax As Long) As Long
  15742. Declare Function SetProcessWindowStation Lib "user32" Alias "SetProcessWindowStation" (ByVal hWinSta As Long) As Long
  15743. Declare Function SetScrollInfo Lib "user32" Alias "SetScrollInfo" (ByVal hWnd As Long, ByVal n As Long, lpcScrollInfo As SCROLLINFO, ByVal bool As Boolean) As Long
  15744. Declare Function SetSystemCursor Lib "user32" Alias "SetSystemCursor" (ByVal hcur As Long, ByVal id As Long) As Long
  15745. Declare Function SetThreadDesktop Lib "user32" Alias "SetThreadDesktop" (ByVal hDesktop As Long) As Long
  15746. Declare Function SetTimer Lib "user32" Alias "SetTimer" (ByVal hWnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long) As Long
  15747. Declare Function SetUserObjectInformation Lib "user32" Alias "SetUserObjectInformationA" (ByVal hObj As Long, ByVal nIndex As Long, pvInfo As Any, ByVal nLength As Long) As Long
  15748. Declare Function SetWindowContextHelpId Lib "user32" Alias "SetWindowContextHelpId" (ByVal hWnd As Long, ByVal dw As Long) As Long
  15749. Declare Function SetWindowRgn Lib "user32" Alias "SetWindowRgn" (ByVal hWnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long
  15750. Declare Function SetWindowsHook Lib "user32" Alias "SetWindowsHookA" (ByVal nFilterType As Long, ByVal pfnFilterProc As Long) As Long
  15751. Declare Function SetWindowsHookEx Lib "user32" Alias "SetWindowsHookExA" (ByVal idHook As Long, ByVal lpfn As Long, ByVal hmod As Long, ByVal dwThreadId As Long) As Long
  15752. Declare Function ShowWindowAsync Lib "user32" Alias "ShowWindowAsync" (ByVal hWnd As Long, ByVal nCmdShow As Long) As Long
  15753. Declare Function SwitchDesktop Lib "user32" Alias "SwitchDesktop" (ByVal hDesktop As Long) As Long
  15754. Declare Function TileWindows Lib "user32" Alias "TileWindows" (ByVal hwndParent As Long, ByVal wHow As Long, lpRect As Rect, ByVal cKids As Long, lpKids As Long) As Integer
  15755. Declare Function ToAsciiEx Lib "user32" Alias "ToAsciiEx" (ByVal uVirtKey As Long, ByVal uScanCode As Long, lpKeyState As Byte, lpChar As Integer, ByVal uFlags As Long, ByVal dwhkl As Long) As Long
  15756.  
  15757. Type TPMPARAMS
  15758.     cbSize As Long
  15759.     rcExclude As Rect
  15760. End Type
  15761.  
  15762. Declare Function TrackPopupMenuEx Lib "user32" Alias "TrackPopupMenuEx" (ByVal hMenu As Long, ByVal un As Long, ByVal n1 As Long, ByVal n2 As Long, ByVal hWnd As Long, lpTPMParams As TPMPARAMS) As Long
  15763. Declare Function UnhookWindowsHook Lib "user32" Alias "UnhookWindowsHook" (ByVal nCode As Long, ByVal pfnFilterProc As Long) As Long
  15764. Declare Function VkKeyScanEx Lib "user32" Alias "VkKeyScanExA" (ByVal ch As Byte, ByVal dwhkl As Long) As Integer
  15765. Declare Function WNetGetUniversalName Lib "mpr" Alias "WNetGetUniversalNameA" (ByVal lpLocalPath As String, ByVal dwInfoLevel As Long, lpBuffer As Any, lpBufferSize As Long) As Long
  15766.  
  15767. Const INVALID_HANDLE_VALUE = -1
  15768.  
  15769. 'DrawEdge Constants
  15770. Const BDR_RAISEDOUTER = &H1
  15771. Const BDR_SUNKENOUTER = &H2
  15772. Const BDR_RAISEDINNER = &H4
  15773. Const BDR_SUNKENINNER = &H8
  15774.  
  15775. Const BDR_OUTER = &H3
  15776. Const BDR_INNER = &HC
  15777. Const BDR_RAISED = &H5
  15778. Const BDR_SUNKEN = &HA
  15779.  
  15780. Const EDGE_RAISED = (BDR_RAISEDOUTER Or BDR_RAISEDINNER)
  15781. Const EDGE_SUNKEN = (BDR_SUNKENOUTER Or BDR_SUNKENINNER)
  15782. Const EDGE_ETCHED = (BDR_SUNKENOUTER Or BDR_RAISEDINNER)
  15783. Const EDGE_BUMP = (BDR_RAISEDOUTER Or BDR_SUNKENINNER)
  15784.  
  15785. Const BF_LEFT = &H1
  15786. Const BF_TOP = &H2
  15787. Const BF_RIGHT = &H4
  15788. Const BF_BOTTOM = &H8
  15789.  
  15790. Const BF_TOPLEFT = (BF_TOP Or BF_LEFT)
  15791. Const BF_TOPRIGHT = (BF_TOP Or BF_RIGHT)
  15792. Const BF_BOTTOMLEFT = (BF_BOTTOM Or BF_LEFT)
  15793. Const BF_BOTTOMRIGHT = (BF_BOTTOM Or BF_RIGHT)
  15794. Const BF_RECT = (BF_LEFT Or BF_TOP Or BF_RIGHT Or BF_BOTTOM)
  15795.  
  15796. Const BF_DIAGONAL = &H10
  15797.  
  15798. ' For diagonal lines, the BF_RECT flags specify the end point of
  15799. ' the vector bounded by the rectangle parameter.
  15800. Const BF_DIAGONAL_ENDTOPRIGHT = (BF_DIAGONAL Or BF_TOP Or BF_RIGHT)
  15801. Const BF_DIAGONAL_ENDTOPLEFT = (BF_DIAGONAL Or BF_TOP Or BF_LEFT)
  15802. Const BF_DIAGONAL_ENDBOTTOMLEFT = (BF_DIAGONAL Or BF_BOTTOM Or BF_LEFT)
  15803. Const BF_DIAGONAL_ENDBOTTOMRIGHT = (BF_DIAGONAL Or BF_BOTTOM Or BF_RIGHT)
  15804.  
  15805. Const BF_MIDDLE = &H800    ' Fill in the middle.
  15806. Const BF_SOFT = &H1000     ' Use for softer buttons.
  15807. Const BF_ADJUST = &H2000   ' Calculate the space left over.
  15808. Const BF_FLAT = &H4000     ' For flat rather than 3-D borders.
  15809. Const BF_MONO = &H8000     ' For monochrome borders.
  15810.  
  15811.